diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-19 13:43:26 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-19 13:43:26 +0100 |
commit | b4cfe06003e7bfb3e5c1e83058267f4224fe07d2 (patch) | |
tree | 313cc381538982d7aec1173a5f3a40c74e2b4540 /CMakeLists.txt | |
parent | 90cc2d3b54b7cf6253d9cc467f4a540005a6fa5d (diff) | |
download | rspamd-b4cfe06003e7bfb3e5c1e83058267f4224fe07d2.tar.gz rspamd-b4cfe06003e7bfb3e5c1e83058267f4224fe07d2.zip |
Make hiredis optional dependency.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 42b77e844..c9d8ae987 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -540,7 +540,6 @@ ENDIF(OPENSSL_FOUND) ProcessPackage(GLIB2 glib-2.0>=2.28) ProcessPackage(GTHREAD gthread-2.0) -ProcessPackage(HIREDIS hiredis libhiredis) ProcessPackage(PCRE pcre libpcre pcre3 libpcre3) ProcessPackage(GMIME2 gmime-2.6 gmime-2.4 gmime-2.0) ProcessPackage(LIBEVENT event libevent) @@ -555,15 +554,20 @@ ELSE(PCRE_LIBRARY) SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};-lpcre") ENDIF(PCRE_LIBRARY) # Libhiredis pc file is so special -FIND_PATH(LIBHIREDIS_INCLUDE hiredis.h +IF(ENABLE_HIREDIS MATCHES "ON") + ProcessPackage(HIREDIS hiredis libhiredis) + SET(WITH_HIREDIS 1) + FIND_PATH(LIBHIREDIS_INCLUDE hiredis.h HINTS "${RSPAMD_SEARCH_PATH}" PATH_SUFFIXES "include" "include/hiredis" PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS} DOC "Path where the hiredis header files can be found") -IF(LIBHIREDIS_INCLUDE) - INCLUDE_DIRECTORIES("${LIBHIREDIS_INCLUDE}") -ENDIF(LIBHIREDIS_INCLUDE) + IF(LIBHIREDIS_INCLUDE) + INCLUDE_DIRECTORIES("${LIBHIREDIS_INCLUDE}") + ENDIF(LIBHIREDIS_INCLUDE) +ENDIF(ENABLE_HIREDIS MATCHES "ON") + # Google performance tools @@ -1020,7 +1024,9 @@ IF(ENABLE_GPERF_TOOLS MATCHES "ON") LIST(APPEND RSPAMD_REQUIRED_LIBRARIES profiler) ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON") -LIST(APPEND RSPAMD_REQUIRED_LIBRARIES hiredis) +IF(ENABLE_HIREDIS MATCHES "ON") + LIST(APPEND RSPAMD_REQUIRED_LIBRARIES hiredis) +ENDIF(ENABLE_HIREDIS MATCHES "ON") IF(GLIB_COMPAT) LIST(APPEND RSPAMD_REQUIRED_LIBRARIES glibadditions) ENDIF(GLIB_COMPAT) |