]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Build quake2 tools
authorMattia Basaglia <mattia.basaglia@gmail.com>
Wed, 29 Jul 2015 07:51:59 +0000 (09:51 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Wed, 29 Jul 2015 07:52:09 +0000 (09:52 +0200)
tools/CMakeLists.txt
tools/quake2/CMakeLists.txt [new file with mode: 0644]

index 81216495f2c802c84e6b003e7dd58ef7bddaff65..52c5f18cab8aa5e8cba971591d9758c6ad30b547 100644 (file)
@@ -3,234 +3,4 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
 
 add_subdirectory(quake3)
-
-set(QUAKE2LIST
-    tools/quake2/common/bspfile.c
-    tools/quake2/common/bspfile.h
-    tools/quake2/common/cmdlib.c
-    tools/quake2/common/cmdlib.h
-    tools/quake2/common/inout.c
-    tools/quake2/common/inout.h
-    tools/quake2/common/l3dslib.c
-    tools/quake2/common/l3dslib.h
-    tools/quake2/common/lbmlib.c
-    tools/quake2/common/lbmlib.h
-    tools/quake2/common/mathlib.c
-    tools/quake2/common/mathlib.h
-    tools/quake2/common/md4.c
-    tools/quake2/common/md4.h
-    tools/quake2/common/path_init.c
-    tools/quake2/common/polylib.c
-    tools/quake2/common/polylib.h
-    tools/quake2/common/q2_threads.h
-    tools/quake2/common/qfiles.h
-    tools/quake2/common/scriplib.c
-    tools/quake2/common/scriplib.h
-    tools/quake2/common/threads.c
-    tools/quake2/common/trilib.c
-    tools/quake2/common/trilib.h
-    tools/quake2/extra/bsp/bspinfo3/bspinfo3.c
-    tools/quake2/extra/bsp/qbsp3/brushbsp.c
-    tools/quake2/extra/bsp/qbsp3/csg.c
-    tools/quake2/extra/bsp/qbsp3/faces.c
-    tools/quake2/extra/bsp/qbsp3/gldraw.c
-    tools/quake2/extra/bsp/qbsp3/glfile.c
-    tools/quake2/extra/bsp/qbsp3/leakfile.c
-    tools/quake2/extra/bsp/qbsp3/map.c
-    tools/quake2/extra/bsp/qbsp3/nodraw.c
-    tools/quake2/extra/bsp/qbsp3/portals.c
-    tools/quake2/extra/bsp/qbsp3/prtfile.c
-    tools/quake2/extra/bsp/qbsp3/qbsp.h
-    tools/quake2/extra/bsp/qbsp3/qbsp3.c
-    tools/quake2/extra/bsp/qbsp3/textures.c
-    tools/quake2/extra/bsp/qbsp3/tree.c
-    tools/quake2/extra/bsp/qbsp3/writebsp.c
-    tools/quake2/extra/bsp/qrad3/lightmap.c
-    tools/quake2/extra/bsp/qrad3/patches.c
-    tools/quake2/extra/bsp/qrad3/qrad.h
-    tools/quake2/extra/bsp/qrad3/qrad3.c
-    tools/quake2/extra/bsp/qrad3/trace.c
-    tools/quake2/extra/bsp/qvis3/flow.c
-    tools/quake2/extra/bsp/qvis3/qvis3.c
-    tools/quake2/extra/bsp/qvis3/vis.h
-    tools/quake2/extra/common/bspfile.c
-    tools/quake2/extra/common/bspfile.h
-    tools/quake2/extra/common/cmdlib.c
-    tools/quake2/extra/common/cmdlib.h
-    tools/quake2/extra/common/l3dslib.c
-    tools/quake2/extra/common/l3dslib.h
-    tools/quake2/extra/common/lbmlib.c
-    tools/quake2/extra/common/lbmlib.h
-    tools/quake2/extra/common/mathlib.c
-    tools/quake2/extra/common/mathlib.h
-    tools/quake2/extra/common/mdfour.c
-    tools/quake2/extra/common/mdfour.h
-    tools/quake2/extra/common/polylib.c
-    tools/quake2/extra/common/polylib.h
-    tools/quake2/extra/common/qfiles.h
-    tools/quake2/extra/common/scriplib.c
-    tools/quake2/extra/common/scriplib.h
-    tools/quake2/extra/common/threads.c
-    tools/quake2/extra/common/threads.h
-    tools/quake2/extra/common/trilib.c
-    tools/quake2/extra/common/trilib.h
-    tools/quake2/extra/qdata/anorms.h
-    tools/quake2/extra/qdata/images.c
-    tools/quake2/extra/qdata/models.c
-    tools/quake2/extra/qdata/qdata.c
-    tools/quake2/extra/qdata/qdata.h
-    tools/quake2/extra/qdata/sprites.c
-    tools/quake2/extra/qdata/tables.c
-    tools/quake2/extra/qdata/video.c
-    tools/quake2/extra/qe4/brush.c
-    tools/quake2/extra/qe4/brush.h
-    tools/quake2/extra/qe4/bspfile.h
-    tools/quake2/extra/qe4/camera.c
-    tools/quake2/extra/qe4/camera.h
-    tools/quake2/extra/qe4/cmdlib.c
-    tools/quake2/extra/qe4/cmdlib.h
-    tools/quake2/extra/qe4/csg.c
-    tools/quake2/extra/qe4/drag.c
-    tools/quake2/extra/qe4/eclass.c
-    tools/quake2/extra/qe4/entity.c
-    tools/quake2/extra/qe4/entity.h
-    tools/quake2/extra/qe4/entityw.h
-    tools/quake2/extra/qe4/glingr.h
-    tools/quake2/extra/qe4/lbmlib.c
-    tools/quake2/extra/qe4/lbmlib.h
-    tools/quake2/extra/qe4/map.c
-    tools/quake2/extra/qe4/map.h
-    tools/quake2/extra/qe4/mathlib.c
-    tools/quake2/extra/qe4/mathlib.h
-    tools/quake2/extra/qe4/mru.c
-    tools/quake2/extra/qe4/mru.h
-    tools/quake2/extra/qe4/parse.c
-    tools/quake2/extra/qe4/parse.h
-    tools/quake2/extra/qe4/points.c
-    tools/quake2/extra/qe4/qe3.c
-    tools/quake2/extra/qe4/qe3.h
-    tools/quake2/extra/qe4/qedefs.h
-    tools/quake2/extra/qe4/qfiles.h
-    tools/quake2/extra/qe4/resource.h
-    tools/quake2/extra/qe4/select.c
-    tools/quake2/extra/qe4/select.h
-    tools/quake2/extra/qe4/textures.c
-    tools/quake2/extra/qe4/textures.h
-    tools/quake2/extra/qe4/vertsel.c
-    tools/quake2/extra/qe4/view.h
-    tools/quake2/extra/qe4/win_cam.c
-    tools/quake2/extra/qe4/win_dlg.c
-    tools/quake2/extra/qe4/win_ent.c
-    tools/quake2/extra/qe4/win_main.c
-    tools/quake2/extra/qe4/win_qe3.c
-    tools/quake2/extra/qe4/win_xy.c
-    tools/quake2/extra/qe4/win_z.c
-    tools/quake2/extra/qe4/xy.c
-    tools/quake2/extra/qe4/xy.h
-    tools/quake2/extra/qe4/z.c
-    tools/quake2/extra/qe4/z.h
-    tools/quake2/extra/texpaint/resource.h
-    tools/quake2/extra/texpaint/texpaint.c
-    tools/quake2/extra/texpaint/texpaint.h
-    tools/quake2/extra/texpaint/win_cam.c
-    tools/quake2/extra/texpaint/win_main.c
-    tools/quake2/extra/texpaint/win_pal.c
-    tools/quake2/extra/texpaint/win_skin.c
-    tools/quake2/q2map/brushbsp.c
-    tools/quake2/q2map/csg.c
-    tools/quake2/q2map/faces.c
-    tools/quake2/q2map/flow.c
-    tools/quake2/q2map/gldraw.c
-    tools/quake2/q2map/glfile.c
-    tools/quake2/q2map/leakfile.c
-    tools/quake2/q2map/lightmap.c
-    tools/quake2/q2map/main.c
-    tools/quake2/q2map/map.c
-    tools/quake2/q2map/nodraw.c
-    tools/quake2/q2map/patches.c
-    tools/quake2/q2map/portals.c
-    tools/quake2/q2map/prtfile.c
-    tools/quake2/q2map/q2map.h
-    tools/quake2/q2map/qbsp.c
-    tools/quake2/q2map/qbsp.h
-    tools/quake2/q2map/qrad.c
-    tools/quake2/q2map/qrad.h
-    tools/quake2/q2map/qvis.c
-    tools/quake2/q2map/qvis.h
-    tools/quake2/q2map/textures.c
-    tools/quake2/q2map/trace.c
-    tools/quake2/q2map/tree.c
-    tools/quake2/q2map/writebsp.c
-    tools/quake2/qdata/anorms.h
-    tools/quake2/qdata/images.c
-    tools/quake2/qdata/models.c
-    tools/quake2/qdata/qdata.c
-    tools/quake2/qdata/qdata.h
-    tools/quake2/qdata/sprites.c
-    tools/quake2/qdata/tables.c
-    tools/quake2/qdata/video.c
-    tools/quake2/qdata_heretic2/common/bspfile.c
-    tools/quake2/qdata_heretic2/common/bspfile.h
-    tools/quake2/qdata_heretic2/common/cmdlib.c
-    tools/quake2/qdata_heretic2/common/cmdlib.h
-    tools/quake2/qdata_heretic2/common/her2_threads.h
-    tools/quake2/qdata_heretic2/common/inout.c
-    tools/quake2/qdata_heretic2/common/inout.h
-    tools/quake2/qdata_heretic2/common/l3dslib.c
-    tools/quake2/qdata_heretic2/common/l3dslib.h
-    tools/quake2/qdata_heretic2/common/lbmlib.c
-    tools/quake2/qdata_heretic2/common/lbmlib.h
-    tools/quake2/qdata_heretic2/common/mathlib.c
-    tools/quake2/qdata_heretic2/common/mathlib.h
-    tools/quake2/qdata_heretic2/common/md4.c
-    tools/quake2/qdata_heretic2/common/md4.h
-    tools/quake2/qdata_heretic2/common/path_init.c
-    tools/quake2/qdata_heretic2/common/polylib.c
-    tools/quake2/qdata_heretic2/common/polylib.h
-    tools/quake2/qdata_heretic2/common/qfiles.c
-    tools/quake2/qdata_heretic2/common/qfiles.h
-    tools/quake2/qdata_heretic2/common/scriplib.c
-    tools/quake2/qdata_heretic2/common/scriplib.h
-    tools/quake2/qdata_heretic2/common/threads.c
-    tools/quake2/qdata_heretic2/common/token.c
-    tools/quake2/qdata_heretic2/common/token.h
-    tools/quake2/qdata_heretic2/common/trilib.c
-    tools/quake2/qdata_heretic2/common/trilib.h
-    tools/quake2/qdata_heretic2/qcommon/angles.h
-    tools/quake2/qdata_heretic2/qcommon/arrayedlist.h
-    tools/quake2/qdata_heretic2/qcommon/flex.h
-    tools/quake2/qdata_heretic2/qcommon/fmodel.h
-    tools/quake2/qdata_heretic2/qcommon/h2common.h
-    tools/quake2/qdata_heretic2/qcommon/placement.h
-    tools/quake2/qdata_heretic2/qcommon/q_typedef.h
-    tools/quake2/qdata_heretic2/qcommon/qfiles.h
-    tools/quake2/qdata_heretic2/qcommon/reference.c
-    tools/quake2/qdata_heretic2/qcommon/reference.h
-    tools/quake2/qdata_heretic2/qcommon/resourcemanager.c
-    tools/quake2/qdata_heretic2/qcommon/resourcemanager.h
-    tools/quake2/qdata_heretic2/qcommon/skeletons.c
-    tools/quake2/qdata_heretic2/qcommon/skeletons.h
-    tools/quake2/qdata_heretic2/adpcm.h
-    tools/quake2/qdata_heretic2/animcomp.c
-    tools/quake2/qdata_heretic2/animcomp.h
-    tools/quake2/qdata_heretic2/anorms.h
-    tools/quake2/qdata_heretic2/book.c
-    tools/quake2/qdata_heretic2/fmodels.c
-    tools/quake2/qdata_heretic2/images.c
-    tools/quake2/qdata_heretic2/jointed.c
-    tools/quake2/qdata_heretic2/jointed.h
-    tools/quake2/qdata_heretic2/joints.h
-    tools/quake2/qdata_heretic2/models.c
-    tools/quake2/qdata_heretic2/pics.c
-    tools/quake2/qdata_heretic2/qd_fmodel.h
-    tools/quake2/qdata_heretic2/qd_skeletons.c
-    tools/quake2/qdata_heretic2/qd_skeletons.h
-    tools/quake2/qdata_heretic2/qdata.c
-    tools/quake2/qdata_heretic2/qdata.h
-    tools/quake2/qdata_heretic2/resource.h
-    tools/quake2/qdata_heretic2/sprites.c
-    tools/quake2/qdata_heretic2/svdcmp.c
-    tools/quake2/qdata_heretic2/tables.c
-    tools/quake2/qdata_heretic2/tmix.c
-    tools/quake2/qdata_heretic2/video.c
-)
+add_subdirectory(quake2)
diff --git a/tools/quake2/CMakeLists.txt b/tools/quake2/CMakeLists.txt
new file mode 100644 (file)
index 0000000..96fe809
--- /dev/null
@@ -0,0 +1,290 @@
+
+include_directories(common)
+include_directories("${CMAKE_SOURCE_DIR}/libs")
+include_directories("${CMAKE_SOURCE_DIR}/include")
+
+find_package(LibXml2 REQUIRED)
+include_directories(${LIBXML2_INCLUDE_DIR})
+
+add_executable(q2map EXCLUDE_FROM_ALL
+   common/bspfile.c
+   common/bspfile.h
+   common/cmdlib.c
+   common/cmdlib.h
+   common/inout.c
+   common/inout.h
+   common/l3dslib.c
+   common/l3dslib.h
+   common/lbmlib.c
+   common/lbmlib.h
+   common/mathlib.c
+   common/mathlib.h
+   common/md4.c
+   common/md4.h
+   common/path_init.c
+   common/polylib.c
+   common/polylib.h
+   common/scriplib.c
+   common/scriplib.h
+   common/threads.c
+   common/trilib.c
+   common/trilib.h
+   q2map/brushbsp.c
+   q2map/csg.c
+   q2map/faces.c
+   q2map/flow.c
+#    q2map/gldraw.c
+   q2map/glfile.c
+   q2map/leakfile.c
+   q2map/lightmap.c
+   q2map/main.c
+   q2map/map.c
+   q2map/nodraw.c
+   q2map/patches.c
+   q2map/portals.c
+   q2map/prtfile.c
+   q2map/q2map.h
+   q2map/qbsp.c
+   q2map/qbsp.h
+   q2map/qrad.c
+   q2map/qrad.h
+   q2map/qvis.c
+   q2map/qvis.h
+   q2map/textures.c
+   q2map/trace.c
+   q2map/tree.c
+   q2map/writebsp.c
+)
+target_link_libraries(q2map
+    ${LIBXML2_LIBRARIES}
+    l_net
+)
+
+add_executable(qdata3 EXCLUDE_FROM_ALL
+   common/bspfile.c
+   common/bspfile.h
+   common/cmdlib.c
+   common/cmdlib.h
+   common/inout.c
+   common/inout.h
+   common/l3dslib.c
+   common/l3dslib.h
+   common/lbmlib.c
+   common/lbmlib.h
+   common/mathlib.c
+   common/mathlib.h
+   common/md4.c
+   common/md4.h
+   common/path_init.c
+   common/polylib.c
+   common/polylib.h
+   common/scriplib.c
+   common/scriplib.h
+   common/threads.c
+   common/trilib.c
+   common/trilib.h
+   qdata/anorms.h
+   qdata/images.c
+   qdata/models.c
+   qdata/qdata.c
+   qdata/qdata.h
+   qdata/sprites.c
+   qdata/tables.c
+   qdata/video.c
+)
+
+target_link_libraries(qdata3
+    ${LIBXML2_LIBRARIES}
+    l_net
+)
+
+# Why is the /common stuff duplicated for qdata_heretic2?
+add_executable(h2data EXCLUDE_FROM_ALL
+   qdata_heretic2/common/bspfile.c
+   qdata_heretic2/common/bspfile.h
+   qdata_heretic2/common/cmdlib.c
+   qdata_heretic2/common/cmdlib.h
+   qdata_heretic2/common/her2_threads.h
+   qdata_heretic2/common/inout.c
+   qdata_heretic2/common/inout.h
+   qdata_heretic2/common/l3dslib.c
+   qdata_heretic2/common/l3dslib.h
+   qdata_heretic2/common/lbmlib.c
+   qdata_heretic2/common/lbmlib.h
+   qdata_heretic2/common/mathlib.c
+   qdata_heretic2/common/mathlib.h
+   qdata_heretic2/common/md4.c
+   qdata_heretic2/common/md4.h
+   qdata_heretic2/common/path_init.c
+   qdata_heretic2/common/polylib.c
+   qdata_heretic2/common/polylib.h
+   qdata_heretic2/common/qfiles.c
+   qdata_heretic2/common/qfiles.h
+   qdata_heretic2/common/scriplib.c
+   qdata_heretic2/common/scriplib.h
+   qdata_heretic2/common/threads.c
+   qdata_heretic2/common/token.c
+   qdata_heretic2/common/token.h
+   qdata_heretic2/common/trilib.c
+   qdata_heretic2/common/trilib.h
+   qdata_heretic2/qcommon/angles.h
+   qdata_heretic2/qcommon/arrayedlist.h
+   qdata_heretic2/qcommon/flex.h
+   qdata_heretic2/qcommon/fmodel.h
+   qdata_heretic2/qcommon/h2common.h
+   qdata_heretic2/qcommon/placement.h
+   qdata_heretic2/qcommon/q_typedef.h
+   qdata_heretic2/qcommon/qfiles.h
+   qdata_heretic2/qcommon/reference.c
+   qdata_heretic2/qcommon/reference.h
+   qdata_heretic2/qcommon/resourcemanager.c
+   qdata_heretic2/qcommon/resourcemanager.h
+   qdata_heretic2/qcommon/skeletons.c
+   qdata_heretic2/qcommon/skeletons.h
+   qdata_heretic2/adpcm.h
+   qdata_heretic2/animcomp.c
+   qdata_heretic2/animcomp.h
+   qdata_heretic2/anorms.h
+   qdata_heretic2/book.c
+   qdata_heretic2/fmodels.c
+   qdata_heretic2/images.c
+   qdata_heretic2/jointed.c
+   qdata_heretic2/jointed.h
+   qdata_heretic2/joints.h
+   qdata_heretic2/models.c
+   qdata_heretic2/pics.c
+   qdata_heretic2/qd_fmodel.h
+   qdata_heretic2/qd_skeletons.c
+   qdata_heretic2/qd_skeletons.h
+   qdata_heretic2/qdata.c
+   qdata_heretic2/qdata.h
+   qdata_heretic2/resource.h
+   qdata_heretic2/sprites.c
+   qdata_heretic2/svdcmp.c
+   qdata_heretic2/tables.c
+   qdata_heretic2/tmix.c
+   qdata_heretic2/video.c
+)
+target_include_directories(h2data BEFORE
+    PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/qdata_heretic2/common"
+    PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/qdata_heretic2/qcommon"
+    PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/qdata_heretic2"
+)
+set_target_properties(h2data PROPERTIES RUNTIME_OUTPUT_DIRECTORY heretic2)
+
+target_link_libraries(h2data
+    ${LIBXML2_LIBRARIES}
+    l_net
+)
+add_custom_target(quake2)
+add_dependencies(quake2 q2map qdata3 h2data)
+
+if (UNIX)
+    target_link_libraries(q2map pthread m)
+    target_link_libraries(qdata3 pthread m)
+    target_link_libraries(h2data pthread m)
+endif()
+
+
+# A bunch of unused files:
+#    common/q2_threads.h
+#    common/qfiles.h
+#    extra/bsp/bspinfo3/bspinfo3.c
+#    extra/bsp/qbsp3/brushbsp.c
+#    extra/bsp/qbsp3/csg.c
+#    extra/bsp/qbsp3/faces.c
+#    extra/bsp/qbsp3/gldraw.c
+#    extra/bsp/qbsp3/glfile.c
+#    extra/bsp/qbsp3/leakfile.c
+#    extra/bsp/qbsp3/map.c
+#    extra/bsp/qbsp3/nodraw.c
+#    extra/bsp/qbsp3/portals.c
+#    extra/bsp/qbsp3/prtfile.c
+#    extra/bsp/qbsp3/qbsp.h
+#    extra/bsp/qbsp3/qbsp3.c
+#    extra/bsp/qbsp3/textures.c
+#    extra/bsp/qbsp3/tree.c
+#    extra/bsp/qbsp3/writebsp.c
+#    extra/bsp/qrad3/lightmap.c
+#    extra/bsp/qrad3/patches.c
+#    extra/bsp/qrad3/qrad.h
+#    extra/bsp/qrad3/qrad3.c
+#    extra/bsp/qrad3/trace.c
+#    extra/bsp/qvis3/flow.c
+#    extra/bsp/qvis3/qvis3.c
+#    extra/bsp/qvis3/vis.h
+#    extra/common/bspfile.c
+#    extra/common/bspfile.h
+#    extra/common/cmdlib.c
+#    extra/common/cmdlib.h
+#    extra/common/l3dslib.c
+#    extra/common/l3dslib.h
+#    extra/common/lbmlib.c
+#    extra/common/lbmlib.h
+#    extra/common/mathlib.c
+#    extra/common/mathlib.h
+#    extra/common/mdfour.c
+#    extra/common/mdfour.h
+#    extra/common/polylib.c
+#    extra/common/polylib.h
+#    extra/common/qfiles.h
+#    extra/common/scriplib.c
+#    extra/common/scriplib.h
+#    extra/common/threads.c
+#    extra/common/threads.h
+#    extra/common/trilib.c
+#    extra/common/trilib.h
+#    extra/qe4/brush.c
+#    extra/qe4/brush.h
+#    extra/qe4/bspfile.h
+#    extra/qe4/camera.c
+#    extra/qe4/camera.h
+#    extra/qe4/cmdlib.c
+#    extra/qe4/cmdlib.h
+#    extra/qe4/csg.c
+#    extra/qe4/drag.c
+#    extra/qe4/eclass.c
+#    extra/qe4/entity.c
+#    extra/qe4/entity.h
+#    extra/qe4/entityw.h
+#    extra/qe4/glingr.h
+#    extra/qe4/lbmlib.c
+#    extra/qe4/lbmlib.h
+#    extra/qe4/map.c
+#    extra/qe4/map.h
+#    extra/qe4/mathlib.c
+#    extra/qe4/mathlib.h
+#    extra/qe4/mru.c
+#    extra/qe4/mru.h
+#    extra/qe4/parse.c
+#    extra/qe4/parse.h
+#    extra/qe4/points.c
+#    extra/qe4/qe3.c
+#    extra/qe4/qe3.h
+#    extra/qe4/qedefs.h
+#    extra/qe4/qfiles.h
+#    extra/qe4/resource.h
+#    extra/qe4/select.c
+#    extra/qe4/select.h
+#    extra/qe4/textures.c
+#    extra/qe4/textures.h
+#    extra/qe4/vertsel.c
+#    extra/qe4/view.h
+#    extra/qe4/win_cam.c
+#    extra/qe4/win_dlg.c
+#    extra/qe4/win_ent.c
+#    extra/qe4/win_main.c
+#    extra/qe4/win_qe3.c
+#    extra/qe4/win_xy.c
+#    extra/qe4/win_z.c
+#    extra/qe4/xy.c
+#    extra/qe4/xy.h
+#    extra/qe4/z.c
+#    extra/qe4/z.h
+#    extra/texpaint/resource.h
+#    extra/texpaint/texpaint.c
+#    extra/texpaint/texpaint.h
+#    extra/texpaint/win_cam.c
+#    extra/texpaint/win_main.c
+#    extra/texpaint/win_pal.c
+#    extra/texpaint/win_skin.c