summaryrefslogtreecommitdiff
path: root/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch')
-rw-r--r--dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch b/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch
new file mode 100644
index 000000000000..2422d29a90fc
--- /dev/null
+++ b/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch
@@ -0,0 +1,17 @@
+Use the lua version selected by lua eclass
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,7 +188,11 @@ if (SOL2_IS_TOP_LEVEL AND (SOL2_DO_TESTS OR SOL2_DO_EXAMPLES))
+
+ string(TOLOWER ${SOL2_LUA_VERSION} NORMALIZED_LUA_VERSION)
+ # Find way to get Lua: build if requested, or attempt to build if no matching version is found
+- if (SOL2_BUILD_LUA)
++ if (TRUE)
++ find_package(PkgConfig REQUIRED)
++ pkg_check_modules(LUA REQUIRED lua IMPORTED_TARGET)
++ add_library(Lua::Lua ALIAS PkgConfig::LUA)
++ elseif (SOL2_BUILD_LUA)
+ find_package(LuaBuild REQUIRED COMPONENTS ${SOL2_LUA_VERSION})
+ elseif (NOT SOL2_LUA_VERSION)
+ find_package(LuaBuild REQUIRED)