[cmake] add -DWITH_LUA_VERSION= to specify lua ver
add -DWITH_LUA_VERSION= to specify specific lua version for build
x-ref:
"Meson / CMake build issues"
@@ -37,6 +37,7 @@ option(WITH_KRB5 "with Kerberos5-support for mod_auth [default: off]")
option(WITH_LDAP "with LDAP-support for mod_auth mod_vhostdb_ldap [default: off]")
option(WITH_PAM "with PAM-support for mod_auth [default: off]")
option(WITH_LUA "with lua for mod_magnet [default: off]")
+option(WITH_LUA_VERSION "specify lua version for mod_magnet")
# option(WITH_VALGRIND "with internal support for valgrind [default: off]")
option(WITH_FAM "fam/gamin for reducing number of stat() calls [default: off]")
option(WITH_LIBDEFLATE "with libdeflate-support for mod_deflate [default: off]")
@@ -757,7 +758,11 @@ else()
endif()
if(WITH_LUA)
+ if(WITH_LUA_VERSION)
+ pkg_search_module(LUA REQUIRED ${WITH_LUA_VERSION})
+ else()
pkg_search_module(LUA REQUIRED lua5.4 lua-5.4 lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua)
+ endif()
message(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}")
set(HAVE_LUA_H 1 "Have liblua header")
else()
