aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-25 13:39:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-25 13:39:35 +0100
commitf0448d158b9858294a5cd54d3b2fab15193f1485 (patch)
treee40f8754c580483b06f69a768982bc7cf23b9af3
parent62e266e47646a68bd9de0d3d49490dcc606799d7 (diff)
downloadrspamd-f0448d158b9858294a5cd54d3b2fab15193f1485.tar.gz
rspamd-f0448d158b9858294a5cd54d3b2fab15193f1485.zip
[Fix] Avoid linking with actrie if hyperscan is enabled
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/rspamadm/CMakeLists.txt8
2 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84a3f5005..4d1f8cf94 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1109,6 +1109,7 @@ IF(GLIB_COMPAT)
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES glibadditions)
ENDIF(GLIB_COMPAT)
+
ADD_SUBDIRECTORY(contrib/xxhash)
ADD_SUBDIRECTORY(contrib/cdb)
ADD_SUBDIRECTORY(contrib/http-parser)
@@ -1124,6 +1125,16 @@ ADD_SUBDIRECTORY(contrib/aho-corasick)
ADD_SUBDIRECTORY(contrib/lpeg)
ADD_SUBDIRECTORY(contrib/linenoise)
+IF (ENABLE_SNOWBALL MATCHES "ON")
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer)
+ENDIF()
+IF(ENABLE_HIREDIS MATCHES "ON")
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis)
+ENDIF()
+IF(ENABLE_HYPERSCAN MATCHES "OFF")
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-actrie)
+ENDIF()
+
IF(ENABLE_CLANG_PLUGIN MATCHES "ON")
ADD_SUBDIRECTORY(clang-plugin)
ENDIF()
diff --git a/src/rspamadm/CMakeLists.txt b/src/rspamadm/CMakeLists.txt
index 992e2a3aa..8189598ed 100644
--- a/src/rspamadm/CMakeLists.txt
+++ b/src/rspamadm/CMakeLists.txt
@@ -36,14 +36,6 @@ ADD_EXECUTABLE(rspamadm ${RSPAMADMSRC})
ADD_DEPENDENCIES(rspamadm rspamadm_lua_preprocess)
TARGET_LINK_LIBRARIES(rspamadm rspamd-server)
TARGET_LINK_LIBRARIES(rspamadm ${RSPAMD_REQUIRED_LIBRARIES})
-
-IF (ENABLE_SNOWBALL MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamadm stemmer)
-ENDIF()
-IF(ENABLE_HIREDIS MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamadm rspamd-hiredis)
-ENDIF()
-TARGET_LINK_LIBRARIES(rspamadm rspamd-actrie)
TARGET_LINK_LIBRARIES(rspamadm rspamd-linenoise)
IF (NOT DEBIAN_BUILD)