summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-07-21 11:46:31 +0200
committerAlexander Harkness <me@bearbin.net>2016-07-21 11:46:31 +0200
commitfc5fb03fec8720341ed87848af0004b23719ac95 (patch)
tree5b816778281e47f34c0f76f1bac72497053f03d7 /CMakeLists.txt
parentDropped 1.7 support (#3253) (diff)
downloadcuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar.gz
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar.bz2
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar.lz
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar.xz
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.tar.zst
cuberite-fc5fb03fec8720341ed87848af0004b23719ac95.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt36
1 files changed, 30 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 272f2394d..aaaac1e1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,18 @@
+# This is the top-level CMakeLists.txt file for the Cuberite project
+#
+# Use CMake to generate the build files for your platform
+#
+# This script supports some configuration through CMake arguments (-Dparam=val syntax):
+# BUILD_TOOLS=1 sets up additional executables to be built along with the server (ProtoProxy, GrownBiomeGenVisualiser, MCADefrag)
+# BUILD_UNSTABLE_TOOLS=1 sets up yet more executables to be built, these can be broken and generally are obsolete (GeneratorPerformanceTest)
+# CROSSCOMPILE=1 marks the build as a crosscompile (doesn't include optimizations for current platform)
+# DISABLE_SYSTEM_LUA=1 disables the use of system Lua interpreter; the tolua executable will be built and used instead. Incompatible with cross-compiling
+# SELF_TEST=1 enables testing code to be built
+
+
+
+
+
cmake_minimum_required (VERSION 2.8.7)
if (POLICY CMP0054)
@@ -96,15 +111,24 @@ endif()
set(BUILD_TOOLS OFF CACHE BOOL "")
set(SELF_TEST OFF CACHE BOOL "")
-# Check whether Lua 5.1 is installed locally:
-include(CheckLua.cmake)
-if(HAS_LUA_INTERPRETER AND ("${LUA_INTERPRETER_VERSION}" STREQUAL "5.1"))
- message(STATUS "Lua 5.1 has been found in your system and will be used for the build.")
+# Check whether Lua 5.1 can be used:
+if (NOT(DISABLE_SYSTEM_LUA))
+ include(CheckLua.cmake)
+ if(HAS_LUA_INTERPRETER AND ("${LUA_INTERPRETER_VERSION}" STREQUAL "5.1"))
+ message(STATUS "Lua 5.1 has been found in your system and will be used for the build.")
+ set(USE_SYSTEM_LUA 1)
+ else()
+ if (CROSSCOMPILE)
+ message(FATAL "To crosscompile, you need to have Lua 5.1 installed in your system and available in PATH.")
+ endif()
+ message(STATUS "Lua 5.1 has NOT been found in your system, the build will use its own Lua implementation.")
+ unset(USE_SYSTEM_LUA)
+ endif()
else()
if (CROSSCOMPILE)
- message(FATAL "To crosscompile, you need to have Lua 5.1 installed in your system and available in PATH.")
+ message(FATAL "CMake parameter mismatch: CROSSCOMPILE is mutually exclusive with DISABLE_SYSTEM_LUA")
endif()
- message(STATUS "Lua 5.1 has NOT been found in your system, the build will use its own Lua implementation.")
+ message(STATUS "System Lua is disabled via CMake command-line parameters. The build will use its own Lua implementation.")
endif()