summaryrefslogtreecommitdiff
path: root/games-simulation/corsix-th/files/corsix-th-9999-cmake_lua_detection.patch
blob: 4ae0dbd8fe74f0b8e310c2b9fa8feb62943d262e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/CMake/GenerateDoc.cmake b/CMake/GenerateDoc.cmake
index f8b9ec8b..ac90134d 100644
--- a/CMake/GenerateDoc.cmake
+++ b/CMake/GenerateDoc.cmake
@@ -19,7 +19,7 @@ endif()
 
 find_program(
   LUA_PROGRAM_PATH
-  ${LUA_PROGRAM_NAMES}
+  lua${LUA_VERSION}
   PATHS
   ENV LUA_DIR
   /opt
diff --git a/CorsixTH/CMakeLists.txt b/CorsixTH/CMakeLists.txt
index b0695a78..06467177 100644
--- a/CorsixTH/CMakeLists.txt
+++ b/CorsixTH/CMakeLists.txt
@@ -125,7 +125,7 @@ if(VCPKG_TARGET_TRIPLET)
   target_include_directories(CorsixTH_lib PUBLIC ${LUA_INCLUDE_DIRS})
   target_link_libraries(CorsixTH_lib PUBLIC ${LUA_LIBRARIES})
 else()
-  find_package(Lua REQUIRED)
+  find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
   if(Lua_FOUND OR LUA_FOUND)
     target_link_libraries(CorsixTH_lib PUBLIC ${LUA_LIBRARY})
     include_directories(${LUA_INCLUDE_DIR})