LUA: Pickup LUA 5.3 or 5.4 if available and use it.

This commit is contained in:
Anders Broman 2024-02-21 21:52:55 +01:00 committed by AndersBroman
parent 8b0e90d62e
commit ac9ff53c7a
2 changed files with 2 additions and 2 deletions

View File

@ -1392,7 +1392,7 @@ if(FETCH_lua)
# Download and build lua
include(${CMAKE_SOURCE_DIR}/cmake/external/lua52/Lua52.cmake)
else()
set(LUA_FIND_VERSIONS "5.2;5.1" CACHE STRING "Lua versions valid for the build (as a list)")
set(LUA_FIND_VERSIONS "5.4;5.3;5.2;5.1" CACHE STRING "Lua versions valid for the build (as a list)")
ws_find_package(Lua ENABLE_LUA HAVE_LUA)
endif()

View File

@ -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\.[4321]")
set(_lua_append_versions ${LUA_VERSIONS5})
message(STATUS "Considering the following Lua versions: ${_lua_append_versions}")