diff --git a/cmake/Modules/FindLuaJIT.cmake b/cmake/Modules/FindLuaJIT.cmake index cd6e7bdd8..4841b821a 100644 --- a/cmake/Modules/FindLuaJIT.cmake +++ b/cmake/Modules/FindLuaJIT.cmake @@ -38,6 +38,12 @@ IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h") STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}") UNSET(lua_version_str) +ELSE() + find_package (PkgConfig REQUIRED) + pkg_check_modules (LuaJIT QUIET REQUIRED luajit) + set (LUA_LIBRARY ${LuaJIT_LIBRARIES}) + set (LUA_INCLUDE_DIR ${LuaJIT_INCLUDE_DIRS}) + set (LUA_VERSION_STRING ${LuaJIT_VERSION}) ENDIF() INCLUDE(FindPackageHandleStandardArgs)