summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindLua.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindLua.cmake')
-rw-r--r--cmake/modules/FindLua.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/modules/FindLua.cmake b/cmake/modules/FindLua.cmake
index 6a594a7d..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}")
@@ -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")