aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-27 15:38:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-27 15:38:34 +0100
commit44e393f9fe9a86bd99ebc5cfcddfe8eb50c8813e (patch)
treeacbea1a0149b064c8de14502e11777192a012b44 /CMakeLists.txt
parentb066f62bfafd0e3dc0ebb181e0990fede4f32d47 (diff)
downloadrspamd-44e393f9fe9a86bd99ebc5cfcddfe8eb50c8813e.tar.gz
rspamd-44e393f9fe9a86bd99ebc5cfcddfe8eb50c8813e.zip
[Project] Add kann library to start torch removal
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80e00e67e..7e2bb0184 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,7 +370,7 @@ ENDFUNCTION(INSTALL_IF_NOT_EXISTS)
MACRO(ProcessPackage PKG_NAME)
CMAKE_PARSE_ARGUMENTS(PKG "OPTIONAL" "ROOT;INCLUDE"
- "LIBRARY;INCLUDE_SUFFIXES;LIB_SUFFIXES;MODULES" ${ARGN})
+ "LIBRARY;INCLUDE_SUFFIXES;LIB_SUFFIXES;MODULES;LIB_OUTPUT" ${ARGN})
IF(NOT PKG_LIBRARY)
SET(PKG_LIBRARY "${PKG_NAME}")
@@ -378,6 +378,9 @@ MACRO(ProcessPackage PKG_NAME)
IF(NOT PKG_INCLUDE)
SET(PKG_INCLUDE "${PKG_NAME}.h")
ENDIF()
+ IF(NOT PKG_LIB_OUTPUT)
+ SET(PKG_LIB_OUTPUT RSPAMD_REQUIRED_LIBRARIES)
+ ENDIF()
IF(NOT PKG_ROOT AND PKG_MODULES)
PKG_SEARCH_MODULE(${PKG_NAME} ${PKG_MODULES})
@@ -406,7 +409,7 @@ MACRO(ProcessPackage PKG_NAME)
FOREACH(_arg ${${_XPREFIX}_LDFLAGS_OTHER})
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_arg}")
ENDFOREACH(_arg ${${_XPREFIX}_LDFLAGS_OTHER})
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${${_XPREFIX}_LIBRARIES}")
+ LIST(APPEND ${PKG_LIB_OUTPUT} "${${_XPREFIX}_LIBRARIES}")
INCLUDE_DIRECTORIES(${${_XPREFIX}_INCLUDEDIR})
ELSE()
IF(NOT ${PKG_NAME}_GUESSED)
@@ -442,7 +445,7 @@ MACRO(ProcessPackage PKG_NAME)
GET_FILENAME_COMPONENT(_lib_path "${_lib}" PATH)
INCLUDE_DIRECTORIES("${_stripped_incl}")
LINK_DIRECTORIES("${_lib_path}")
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ${_lib})
+ LIST(APPEND ${PKG_LIB_OUTPUT} ${_lib})
SET(${PKG_NAME}_INCLUDE "${_stripped_incl}" CACHE INTERNAL "")
SET(${PKG_NAME}_LIBRARY_PATH "${_lib_path}" CACHE INTERNAL "")
SET(${PKG_NAME}_LIBRARY "${_lib}" CACHE INTERNAL "")
@@ -455,7 +458,7 @@ MACRO(ProcessPackage PKG_NAME)
MESSAGE(STATUS "Found package ${PKG_NAME} (cached)")
INCLUDE_DIRECTORIES("${${PKG_NAME}_INCLUDE}")
LINK_DIRECTORIES("${${PKG_NAME}_LIBRARY_PATH}")
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${${PKG_NAME}_LIBRARY}")
+ LIST(APPEND ${PKG_LIB_OUTPUT} "${${PKG_NAME}_LIBRARY}")
ENDIF()
ENDIF(${PKG_NAME}_FOUND)
@@ -1211,6 +1214,7 @@ ADD_SUBDIRECTORY(contrib/lua-lpeg)
ADD_SUBDIRECTORY(contrib/linenoise)
ADD_SUBDIRECTORY(contrib/t1ha)
ADD_SUBDIRECTORY(contrib/libev)
+ADD_SUBDIRECTORY(contrib/kann)
IF (ENABLE_SNOWBALL MATCHES "ON")
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer)