]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
bundle: make daemonmap buildable and bundlable like other tools as submodule 162/head
authorThomas Debesse <dev@illwieckz.net>
Mon, 30 Mar 2020 02:27:13 +0000 (04:27 +0200)
committerThomas Debesse <dev@illwieckz.net>
Wed, 1 Apr 2020 00:04:03 +0000 (02:04 +0200)
.gitmodules
CMakeLists.txt
README.md
easy-builder
tools/CMakeLists.txt
tools/unvanquished/CMakeLists.txt [new file with mode: 0644]
tools/unvanquished/daemonmap [new submodule]

index d20f6e35835027edcedd18a4d484cbf4841ded21..f8d6fc747fcc64e60bffbafa291bcd25918c2920 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "libs/crunch"]
        path = libs/crunch
        url = https://github.com/DaemonEngine/crunch.git
+[submodule "tools/unvanquished/daemonmap"]
+       path = tools/unvanquished/daemonmap
+       url = https://github.com/DaemonEngine/daemonmap.git
index 6d82b5cbfa800c3cae6e5e4e62cfe20629bbecd8..fbdef8b3b292d0cd8d7a4cdeb21bc76e2994b4ad 100644 (file)
@@ -8,9 +8,16 @@ else ()
     set(DEFAULT_BUILD_CRUNCH OFF CACHE INTERNAL "...")
 endif ()
 
+if (EXISTS "${PROJECT_SOURCE_DIR}/tools/unvanquished/daemonmap/tools/quake3/q3map2/main.c")
+    set(DEFAULT_BUILD_DAEMONMAP ON CACHE INTERNAL "...")
+else ()
+    set(DEFAULT_BUILD_DAEMONMAP OFF CACHE INTERNAL "...")
+endif ()
+
 option(BUILD_RADIANT "Build the GUI" ON)
 option(BUILD_TOOLS "Build the tools" ON)
 option(BUILD_CRUNCH "Build Crunch image support" ${DEFAULT_BUILD_CRUNCH})
+option(BUILD_DAEMONMAP "Build daemonmap navigation mesh generator" ${DEFAULT_BUILD_DAEMONMAP})
 option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
 option(USE_WERROR "Build with -Werror -pedantic-errors" OFF)
 option(FHS_INSTALL "Install according to Filesystem Hierarchy Standard" OFF)
index 9592b437acecbafc6bd4a7dec3cc918fd5aa806f..7507fffea82aa985357967d9d840cd7772e17134 100644 (file)
--- a/README.md
+++ b/README.md
@@ -177,6 +177,8 @@ Options:
   Do not build NetRadiant (default: `ON`, build netradiant graphical editor);
 * `BUILD_TOOLS=OFF`  
   Do not build q3map2 and other tools (default: `ON`, build command line tools);
+* `BUILD_DAEMONMAP=OFF`  
+  Do not build daemonmap tool (default: `ON` if submodule is there, buils daemonmap navigation mesh generator);
 * `BUILD_CRUNCH=OFF`  
   Disable crunch support (default: `ON` if submodule is there, enable crunch support);
 * `RADIANT_ABOUTMSG="Custom build by $(whoami)"`  
@@ -184,16 +186,18 @@ Options:
 
 Targets:
 
-* `binaries`          Compiles all binaries;
-  - `netradiant`      Compiles the netradiant editor;
-  - `modules`         Compiles all modules (each module has its own target as well);
-  - `plugins`         Compiles all plugins (each plugin has its own target as well);
-  - `tools`           Compiles all tools (each tool has its own target as well);
-     * `quake2`       Compiles all the Quake 2 tools: `q2map`, `qdata3`;
-     * `heretic2`     Compiles all the Heretic2 tools: `q2map`, `h2data`;
-     * `quake3`       Compiles all the Quake 3 tools:
-         - `q3map2`   Compiles the quake3 map compiler;
-         - `q3data`   Compiles the q3data tool.
+* `binaries`            Compile all binaries;
+  - `netradiant`        Compile the netradiant editor;
+  - `modules`           Compile all modules (each module has its own target as well);
+  - `plugins`           Compile all plugins (each plugin has its own target as well);
+  - `tools`             Compile all tools (each tool has its own target as well);
+     * `quake2`         Compile all the Quake 2 tools: `q2map`, `qdata3`;
+     * `heretic2`       Compile all the Heretic2 tools: `q2map`, `h2data`;
+     * `quake3`         Compile all the Quake 3 tools:
+         - `q3map2`     Compile the Quake 3 map compiler;
+         - `q3data`     Compile the q3data tool;
+     * `unvanquished`   Compile all the Unvanquished tool: `daemonmap`, `q3map3`, `q4data`;
+         - `daemonmap`  Compile the daemonmap navigation mesh generator.
 
 Type `make help` to get an exhaustive list of targets.
 
index 316802ff2856b5f18c8efaf6a8d932216b480fc5..18517b46a6f6cbf8b4a237817b28723c563d9b7a 100755 (executable)
@@ -86,7 +86,8 @@ do
 done
 
 declare -a fetch_submodules_cmd
-for submodule_file in 'libs/crunch/inc/crn_decomp.h'
+for submodule_file in 'libs/crunch/inc/crn_decomp.h' \
+       'tools/unvanquished/daemonmap/tools/quake3/q3map2/main.c'
 do
        if ! [ -f "${project_source_dir}/${submodule_file}" ]
        then
index b8f8565418b48968ecb7b4ecd67c1286be83fe1e..6e30389c35107adcb53c9e16d403b8fc51868aa2 100644 (file)
@@ -6,3 +6,5 @@ add_subdirectory(quake3)
 
 add_custom_target(tools)
 add_dependencies(tools quake2 heretic2 quake3)
+
+add_subdirectory(unvanquished)
diff --git a/tools/unvanquished/CMakeLists.txt b/tools/unvanquished/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ed9ed82
--- /dev/null
@@ -0,0 +1,9 @@
+if (BUILD_DAEMONMAP)
+    # Always keep daemonmap libs/
+    # up-to-date with NetRadiant libs/
+    include_directories(daemonmap/libs)
+    include_directories(daemonmap/tools)
+
+    add_subdirectory(daemonmap/libs)
+    add_subdirectory(daemonmap/tools)
+endif()
diff --git a/tools/unvanquished/daemonmap b/tools/unvanquished/daemonmap
new file mode 160000 (submodule)
index 0000000..9e64c06
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 9e64c065458e57df4628101600ec6cd2951c71fe