]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - CMakeLists.txt
bundle: make daemonmap buildable and bundlable like other tools as submodule
[xonotic/netradiant.git] / CMakeLists.txt
index fb00a218a1bdb94d8ad3dcdd981b5fbfaefcb621..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)
@@ -282,10 +289,6 @@ endif ()
 #-----------------------------------------------------------------------
 
 if (BUILD_BINARIES)
-    if (CMAKE_EXECUTABLE_SUFFIX)
-        string(REGEX REPLACE "^[.]" "" RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
-    endif ()
-
     macro (radiant_tool name)
         add_dependencies(binaries ${name})
 
@@ -305,9 +308,6 @@ if (BUILD_BINARIES)
 
     if (BUILD_RADIANT)
         add_subdirectory(radiant)
-        set_target_properties(${RADIANT_BASENAME} PROPERTIES
-        COMPILE_DEFINITIONS RADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}"
-    )
     endif ()
 endif ()