list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
project(NetRadiant C CXX)
+if (EXISTS "${PROJECT_SOURCE_DIR}/libs/crunch/inc/crn_decomp.h")
+ set(DEFAULT_BUILD_CRUNCH ON CACHE INTERNAL "...")
+else ()
+ set(DEFAULT_BUILD_CRUNCH 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" OFF)
+option(BUILD_CRUNCH "Build Crunch image support" ${DEFAULT_BUILD_CRUNCH})
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)
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_CRUNCH=ON`
- Enable crunch support (default: `OFF`, disable crunch support);
+* `BUILD_CRUNCH=OFF`
+ Disable crunch support (default: `ON` if submodule is there, enable crunch support);
* `RADIANT_ABOUTMSG="Custom build by $(whoami)"`
A message shown in the about dialog (default: `Custom build`).