diff options
author | YuGiOhJCJ <yugiohjcj@1s.fr> | 2017-04-07 07:29:43 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-07 07:29:43 +0200 |
commit | b751c59f43e04f698f517383b62a9c4e1f82523e (patch) | |
tree | 2c8aa001862798035421266d918361953552e316 | |
parent | 676951d90dc7807733288c3c66952bb0394e2e7c (diff) | |
download | minetest-b751c59f43e04f698f517383b62a9c4e1f82523e.tar.gz minetest-b751c59f43e04f698f517383b62a9c4e1f82523e.tar.bz2 minetest-b751c59f43e04f698f517383b62a9c4e1f82523e.zip |
Add the REQUIRE_LUAJIT option (#5526)
-rw-r--r-- | lib/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 32d914720..bc398f607 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,13 +1,20 @@ # LuaJIT option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE) set(USE_LUAJIT FALSE PARENT_SCOPE) +option(REQUIRE_LUAJIT "Require LuaJIT support" FALSE) +if(REQUIRE_LUAJIT) + set(ENABLE_LUAJIT TRUE) +endif() if(ENABLE_LUAJIT) find_package(LuaJIT) if(LUAJIT_FOUND) set(USE_LUAJIT TRUE) set(USE_LUAJIT TRUE PARENT_SCOPE) message (STATUS "Using LuaJIT provided by system.") - endif(LUAJIT_FOUND) + elseif(REQUIRE_LUAJIT) + message(FATAL_ERROR "LuaJIT not found whereas REQUIRE_LUAJIT=\"TRUE\" is used.\n" + "To continue, either install LuaJIT or do not use REQUIRE_LUAJIT=\"TRUE\".") + endif() else() message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)") endif() |