aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/rmilter/system_hiredis.patch
blob: d72e9cd03da0f159fae068376ecf2332b8847053 (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
27
28
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,6 +370,8 @@
 ProcessPackage(GLIB2 LIBRARY glib-2.0 INCLUDE glib.h
 	INCLUDE_SUFFIXES include/glib
 	ROOT ${GLIB_ROOT_DIR} MODULES glib-2.0>=2.28)
+ProcessPackage(LIBHIREDIS LIBRARY hiredis INCLUDE hiredis.h INCLUDE_SUFFIXES include/hiredis
+	LIB_SUFFIXES lib/libhiredis ROOT ${LIBHIREDIS_ROOT_DIR} MODULES libhiredis)
 
 IF(ENABLE_DKIM MATCHES "ON")
 	SET(WITH_DKIM 1)
@@ -388,8 +390,6 @@
 ENDIF()
 
 ################################ SOURCES SECTION ###########################
-ADD_SUBDIRECTORY(hiredis)
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/hiredis")
 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/lc-btrie")
 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/")
 ADD_SUBDIRECTORY(contrib/libucl)
@@ -421,7 +421,6 @@
 ADD_EXECUTABLE(rmilter ${RMILTERSRC})
 SET_TARGET_PROPERTIES(rmilter PROPERTIES LINKER_LANGUAGE C)
 TARGET_LINK_LIBRARIES(rmilter ${RMILTER_REQUIRED_LIBRARIES})
-TARGET_LINK_LIBRARIES(rmilter rmilter-hiredis)
 TARGET_LINK_LIBRARIES(rmilter ucl)
 TARGET_LINK_LIBRARIES(rmilter xxhash)
 TARGET_LINK_LIBRARIES(rmilter rmilter-http-parser)