diff options
Diffstat (limited to '')
-rw-r--r-- | cmake/modules/FindLua.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cmake/modules/FindLua.cmake b/cmake/modules/FindLua.cmake index 23e50a6a..7bacfdd4 100644 --- a/cmake/modules/FindLua.cmake +++ b/cmake/modules/FindLua.cmake @@ -56,7 +56,7 @@ unset(_lua_append_versions) # this is a function only to have all the variables inside go away automatically function(_lua_get_versions) set(LUA_VERSIONS5 ${LUA_FIND_VERSIONS}) - list(FILTER LUA_VERSIONS5 INCLUDE REGEX "5\.[21]") + list(FILTER LUA_VERSIONS5 INCLUDE REGEX "5\.[43]") set(_lua_append_versions ${LUA_VERSIONS5}) message(STATUS "Considering the following Lua versions: ${_lua_append_versions}") @@ -184,7 +184,7 @@ find_library(LUA_LIBRARY HINTS ${LUA_HINTS} ENV LUA_DIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${_lua_library_names} ) unset(_lua_library_names) @@ -220,6 +220,15 @@ cmake_policy(POP) IF(Lua_FOUND) SET( LUA_INCLUDE_DIRS ${LUA_INCLUDE_DIR} ) + + unset(HAVE_LUA_INTEGER_SIZE CACHE) + cmake_push_check_state() + include(CheckTypeSize) + set(CMAKE_REQUIRED_INCLUDES ${LUA_INCLUDE_DIR}) + set(CMAKE_EXTRA_INCLUDE_FILES "luaconf.h") + check_type_size(LUA_INTEGER LUA_INTEGER_SIZE) + cmake_pop_check_state() + if (WIN32) set ( LUA_DLL_DIR "${LUA_HINTS}" CACHE PATH "Path to Lua DLL") file( GLOB _lua_dll RELATIVE "${LUA_DLL_DIR}" "${LUA_DLL_DIR}/lua*.dll") |