mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Improve LuaJIT detection
On openSUSE luajit is not detected correctly. This is because openSUSE is using a lua version suffix, like other Linux distributions do it also. So the include directory is: include/luajit-5_1-2.0
This commit is contained in:
committed by
est31
parent
5643b9b9ed
commit
70ece71ee4
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user