From f0448d158b9858294a5cd54d3b2fab15193f1485 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 25 Jun 2016 13:39:35 +0100 Subject: [PATCH] [Fix] Avoid linking with actrie if hyperscan is enabled --- CMakeLists.txt | 11 +++++++++++ src/rspamadm/CMakeLists.txt | 8 -------- 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) -- 2.39.5