diff options
author | João Valverde <j@v6e.pt> | 2023-08-17 17:59:13 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-08-17 18:16:12 +0000 |
commit | 759c0feab351de2b20946ececf2949ab52592ccd (patch) | |
tree | afbdb0ad3ebc2d25b492018d4d4ca10978a164c4 /cmake/modules | |
parent | 008d389e94b2fee557fd525aa1f4b2af1db1a3d0 (diff) |
CMake: Accept any supported Lua version by default
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindLua.cmake | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/cmake/modules/FindLua.cmake b/cmake/modules/FindLua.cmake index 7e835843c2..23e50a6a94 100644 --- a/cmake/modules/FindLua.cmake +++ b/cmake/modules/FindLua.cmake @@ -55,18 +55,10 @@ unset(_lua_append_versions) # this is a function only to have all the variables inside go away automatically function(_lua_get_versions) - if (LUA_FIND_VERSIONS STREQUAL 5.2) - set(LUA_VERSIONS5 5.2) - elseif(LUA_FIND_VERSIONS STREQUAL 5.1) - set(LUA_VERSIONS5 5.1) - else() - set(LUA_VERSIONS5 5.2 5.1) - endif() + set(LUA_VERSIONS5 ${LUA_FIND_VERSIONS}) + list(FILTER LUA_VERSIONS5 INCLUDE REGEX "5\.[21]") set(_lua_append_versions ${LUA_VERSIONS5}) - - if (LUA_Debug) - message(STATUS "Considering following Lua versions: ${_lua_append_versions}") - endif() + message(STATUS "Considering the following Lua versions: ${_lua_append_versions}") set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE) endfunction() |