diff options
author | Ronan Collobert <ronan@collobert.com> | 2013-10-24 19:20:19 +0400 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2013-10-24 19:20:19 +0400 |
commit | dec5babb349b5ed964cc50e96cf0b12ccc1207f0 (patch) | |
tree | 6d8ebbb2f77f29f12d516710158bc2737daafe92 | |
parent | 115e8e389188f598ed20b00e665281bf6afc862c (diff) |
cmake: make sure luajit is detected, otherwise qlua crashes on mac (because of missing linker flags)
-rw-r--r-- | cmake/FindLua.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake index 7fd795b..8fef156 100644 --- a/cmake/FindLua.cmake +++ b/cmake/FindLua.cmake @@ -8,6 +8,8 @@ # LUA_PACKAGE_CPATH - where Lua searches for library packages # LUA_FOUND - If false, don't attempt to use lua. +INCLUDE(CheckLibraryExists) + SET(LUA_EXECUTABLE "${LUA}") FIND_LIBRARY(LUA_LIBRARIES @@ -16,6 +18,10 @@ FIND_LIBRARY(LUA_LIBRARIES ${LUA_BINDIR} NO_DEFAULT_PATH) +IF(LUA_LIBRARIES) + CHECK_LIBRARY_EXISTS(${LUA_LIBRARIES} luaJIT_setmode "" LUA_JIT) +ENDIF() + SET(LUA_INCLUDE_DIR "${LUA_INCDIR}") SET(LUA_PACKAGE_PATH "${LUADIR}") |