From: Thomas Debesse Date: Mon, 30 Mar 2020 02:27:13 +0000 (+0200) Subject: bundle: make daemonmap buildable and bundlable like other tools as submodule X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d2c6f1a6bc7d98320a0685aaac7239cd2ddc449;p=xonotic%2Fnetradiant.git bundle: make daemonmap buildable and bundlable like other tools as submodule --- diff --git a/.gitmodules b/.gitmodules index d20f6e35..f8d6fc74 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d82b5cb..fbdef8b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 9592b437..7507fffe 100644 --- 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. diff --git a/easy-builder b/easy-builder index 316802ff..18517b46 100755 --- a/easy-builder +++ b/easy-builder @@ -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 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index b8f85654..6e30389c 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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 index 00000000..ed9ed821 --- /dev/null +++ b/tools/unvanquished/CMakeLists.txt @@ -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 index 00000000..9e64c065 --- /dev/null +++ b/tools/unvanquished/daemonmap @@ -0,0 +1 @@ +Subproject commit 9e64c065458e57df4628101600ec6cd2951c71fe