aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rmilter/system_hiredis.patch
blob: 006eb5ffad694abf123f67cbc29376375378798e (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
29
30
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae4dbc4..216b177 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -367,6 +367,8 @@ ProcessPackage(LIBMILTER LIBRARY milter INCLUDE mfapi.h INCLUDE_SUFFIXES include
 	LIB_SUFFIXES lib/libmilter ROOT ${LIBMILTER_ROOT_DIR} MODULES libmilter)
 ProcessPackage(PCRE LIBRARY pcre INCLUDE pcre.h INCLUDE_SUFFIXES include/pcre
 	ROOT ${PCRE_ROOT_DIR} MODULES pcre libpcre pcre3 libpcre3)
+ProcessPackage(LIBHIREDIS LIBRARY hiredis INCLUDE hiredis.h INCLUDE_SUFFIXES include/hiredis
+       LIB_SUFFIXES lib/libhiredis ROOT ${LIBHIREDIS_ROOT_DIR} MODULES libhiredis)
 ProcessPackage(GLIB2 LIBRARY glib-2.0 INCLUDE glib.h
 	INCLUDE_SUFFIXES include/glib
 	ROOT ${GLIB_ROOT_DIR} MODULES glib-2.0>=2.28)
@@ -388,8 +390,6 @@ IF(ENABLE_MEMCACHED MATCHES "ON")
 ENDIF()
 
 ################################ SOURCES SECTION ###########################
-ADD_SUBDIRECTORY(hiredis)
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/hiredis")
 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/lc-btrie")
 ADD_SUBDIRECTORY(contrib/libucl)
 ADD_SUBDIRECTORY(contrib/http-parser)
@@ -419,7 +419,6 @@ CONFIGURE_FILE(config.h.in config.h)
 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)