summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-13 23:45:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-13 23:45:06 +0000
commit1b94a3560cea4824cff6321e02baabb6972ecfdb (patch)
tree3886c251022a04de9e1531abc4e8077cbc505d41 /CMakeLists.txt
parent9d0fd4d7e5b5a3f3752d5c2f625fd6243da10704 (diff)
downloadrspamd-1b94a3560cea4824cff6321e02baabb6972ecfdb.tar.gz
rspamd-1b94a3560cea4824cff6321e02baabb6972ecfdb.zip
Eliminate mess with linking.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt44
1 files changed, 42 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9038f6468..d5a3b7d61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@
############################# INITIAL SECTION #############################################
PROJECT(rspamd C)
+ENABLE_LANGUAGE(ASM)
SET(RSPAMD_VERSION_MAJOR 0)
SET(RSPAMD_VERSION_MINOR 9)
@@ -580,8 +581,6 @@ ELSE(ENABLE_STATIC MATCHES "ON")
ENDIF(NO_SHARED MATCHES "OFF")
ENDIF(ENABLE_STATIC MATCHES "ON")
-LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
-
# Process with warn flags
SET(CMAKE_C_WARN_FLAGS "")
CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
@@ -909,6 +908,47 @@ ENDIF(NOT HIREDIS_FOUND)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES pcre)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ucl)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rdns)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ottery)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES event)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES xxhash)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES siphash)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES blake2)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES tweetnacl)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES sqlite3)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES lua-ucl)
+IF(OPENSSL_FOUND)
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
+ENDIF(OPENSSL_FOUND)
+IF(HAVE_FETCH_H)
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES fetch)
+ENDIF(HAVE_FETCH_H)
+LIST(APPEND RSPAMD_REQUIRED_LIBRARIES event)
+IF(HAVE_LIBEVENT2)
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES event_pthreads)
+ENDIF(HAVE_LIBEVENT2)
+IF(WITH_DB)
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES db)
+ENDIF(WITH_DB)
+
+IF(ENABLE_LUAJIT MATCHES "ON")
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${LUAJIT_LIBRARY}")
+ELSE(ENABLE_LUAJIT MATCHES "ON")
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${LUA_LIBRARY}")
+ENDIF(ENABLE_LUAJIT MATCHES "ON")
+
+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(GLIB_COMPAT)
+ LIST(APPEND RSPAMD_REQUIRED_LIBRARIES glibadditions)
+ENDIF(GLIB_COMPAT)
+
ADD_SUBDIRECTORY(contrib/xxhash)
ADD_SUBDIRECTORY(contrib/http-parser)
ADD_SUBDIRECTORY(contrib/libottery)