]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
enable crunch if available
authorThomas Debesse <dev@illwieckz.net>
Tue, 12 Nov 2019 07:31:04 +0000 (08:31 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 20 Jan 2020 19:44:14 +0000 (20:44 +0100)
CMakeLists.txt
README.md

index 76f733fedfb356c64b66fb46f4f1556e1b6fcb35..fb00a218a1bdb94d8ad3dcdd981b5fbfaefcb621 100644 (file)
@@ -2,9 +2,15 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
 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)
index dfcbcb0418f0a0888e051594fd00a29292952ea8..192d2826469cebf1a364067ea357c994da421a99 100644 (file)
--- a/README.md
+++ b/README.md
@@ -148,8 +148,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_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`).