summaryrefslogblamecommitdiff
path: root/user/rspamd/20-lua-cmake.patch
blob: cfd3926d61a177f1714318b5818b821bbeff5fd9 (plain) (tree)





































                                                                                                                  
rspamd's FindLua macro fails to find our lua libs and includes, but it also
always undefines LUA_LIBRARY and LUA_INCLUDE_DIR.

--- a/CMakeLists.txt	2020-04-01 13:57:55.000000000 +0000
+++ b/CMakeLists.txt	2020-08-16 05:12:50.850000000 +0000
@@ -121,31 +121,8 @@
 
 # Now find libraries and headers
 LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "m")
-IF(ENABLE_LUAJIT MATCHES "ON")
-	#ProcessPackage(LUAJIT luajit)
-	SET(WITH_LUA 1)
-	FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}")
-	IF(NOT LUA_FOUND)
-		MESSAGE(FATAL_ERROR "Lua not found, lua support is required")
-	ELSE(NOT LUA_FOUND)
-		SET(WITH_LUA 1)
-		INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
-	ENDIF(NOT LUA_FOUND)
-ELSE(ENABLE_LUAJIT MATCHES "ON")
-	FindLua(VERSION_MAJOR "5" VERSION_MINOR "3" ROOT "${LUA_ROOT}")
-	IF(NOT LUA_FOUND)
-		FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}")
-		IF(NOT LUA_FOUND)
-				FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}")
-		ENDIF(NOT LUA_FOUND)
-	ENDIF(NOT LUA_FOUND)
-	IF(NOT LUA_FOUND)
-			MESSAGE(FATAL_ERROR "Lua not found, lua support is required")
-	ELSE(NOT LUA_FOUND)
-			SET(WITH_LUA 1)
-			INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
-	ENDIF(NOT LUA_FOUND)
-ENDIF(ENABLE_LUAJIT MATCHES "ON")
+
+INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}")
 
 IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
 	ProcessPackage(JEMALLOC LIBRARY jemalloc_pic jemalloc INCLUDE jemalloc.h INCLUDE_SUFFIXES include/jemalloc