diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dfbd2f5d8..6256a8504 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,8 +155,23 @@ if(ENABLE_FREETYPE) endif() endif(ENABLE_FREETYPE) - -find_package(Lua REQUIRED) +# LuaJIT +option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE) +set(USE_LUAJIT FALSE) +if(ENABLE_LUAJIT) + find_package(LuaJIT) + if(LUAJIT_FOUND) + set(USE_LUAJIT TRUE) + endif(LUAJIT_FOUND) +else() + message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)") +endif() +if(NOT USE_LUAJIT) + message(STATUS "LuaJIT not found, using bundled Lua.") + set(LUA_LIBRARY "lua") + set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") + add_subdirectory(lua) +endif() find_package(GMP REQUIRED) |