diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 44 |
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) |