propagate Lua include dir when compile-checking Luabind, fixes #1196
This commit is contained in:
parent
bd33202972
commit
fd747c7340
@ -11,10 +11,12 @@ if(NOT APPLE)
|
|||||||
find_package(LuaJIT 5.2)
|
find_package(LuaJIT 5.2)
|
||||||
endif()
|
endif()
|
||||||
if(LUA52_FOUND)
|
if(LUA52_FOUND)
|
||||||
|
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||||
|
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
|
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( LUABIND_WORKS )
|
if(LUABIND_WORKS)
|
||||||
message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
|
message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
|
message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
|
||||||
@ -30,7 +32,7 @@ else()
|
|||||||
|
|
||||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)
|
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)
|
||||||
|
|
||||||
if( LUABIND51_WORKS )
|
if(LUABIND51_WORKS)
|
||||||
message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
|
message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")
|
message(FATAL_ERROR "Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")
|
||||||
|
Loading…
Reference in New Issue
Block a user