1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-23 08:08:47 -05:00

Fix broken cross-compiling

This commit is contained in:
Sfan5 2014-02-16 08:07:57 +01:00
parent c163859057
commit 4585fba98b

View File

@ -217,6 +217,10 @@ endif (NOT DISABLE_LUAJIT)
set(USE_LUAJIT 0) set(USE_LUAJIT 0)
if(LUA_LIBRARY AND LUA_INCLUDE_DIR) if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
message (STATUS "LuaJIT found, checking for broken versions...") message (STATUS "LuaJIT found, checking for broken versions...")
if(CMAKE_CROSSCOMPILING)
message(WARNING "Cross-compiling enabled, assuming LuaJIT is not broken")
set(VALID_LUAJIT_VERSION 1)
elseif(CMAKE_CROSSCOMPILING)
set(BACKUP_REQUIRED_INCS CMAKE_REQUIRED_INCLUDES) set(BACKUP_REQUIRED_INCS CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${LUA_INCLUDE_DIR}") set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${LUA_INCLUDE_DIR}")
CHECK_C_SOURCE_RUNS(" CHECK_C_SOURCE_RUNS("
@ -245,6 +249,7 @@ if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
" "
VALID_LUAJIT_VERSION) VALID_LUAJIT_VERSION)
set(CMAKE_REQUIRED_INCLUDES BACKUP_REQUIRED_INCS) set(CMAKE_REQUIRED_INCLUDES BACKUP_REQUIRED_INCS)
endif(CMAKE_CROSSCOMPILING)
if (VALID_LUAJIT_VERSION) if (VALID_LUAJIT_VERSION)
message (STATUS "LuaJIT version ok") message (STATUS "LuaJIT version ok")
set(USE_LUAJIT 1) set(USE_LUAJIT 1)