Skip to content

Commit

Permalink
add LUA_VERSION to allow users to choose lua version (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu authored Aug 19, 2024
1 parent 8953d7b commit fa6563c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
set(LUA_VERSION "lua" CACHE STRING "lua version")
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/lua5.4/lua.h")
find_package(PkgConfig)
if(PkgConfig_FOUND)
foreach(pkg lua lua54 lua53 lua52 luajit lua51)
foreach(pkg ${LUA_VERSION} lua54 lua53 lua52 luajit lua51)
pkg_check_modules(LUA IMPORTED_TARGET GLOBAL ${pkg})
if(LUA_FOUND)
break()
Expand Down

0 comments on commit fa6563c

Please sign in to comment.