summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch')
-rw-r--r--games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch b/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch
new file mode 100644
index 000000000000..53a29161a141
--- /dev/null
+++ b/games-sports/xmoto/files/xmoto-0.6.1_cmake_lua_version.patch
@@ -0,0 +1,13 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -40,8 +40,8 @@
+ endif()
+ find_package(PNG REQUIRED)
+
+-find_package(Lua)
+-set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA51_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
++find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
++set(USE_SYSTEM_Lua $<AND:$<BOOL:${PREFER_SYSTEM_Lua}>,$<BOOL:${LUA_FOUND}>,$<NOT:$<BOOL:${WIN32}>>>)
+ if (NOT LUA_VERSION_STRING VERSION_LESS 5.2 AND LUA_VERSION_STRING VERSION_LESS 5.3)
+ add_definitions("-DLUA_COMPAT_ALL")
+ elseif (LUA_VERSION_STRING VERSION_GREATER_EQUAL "5.3")