diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-13 23:45:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-13 23:45:06 +0000 |
commit | 1b94a3560cea4824cff6321e02baabb6972ecfdb (patch) | |
tree | 3886c251022a04de9e1531abc4e8077cbc505d41 /src/CMakeLists.txt | |
parent | 9d0fd4d7e5b5a3f3752d5c2f625fd6243da10704 (diff) | |
download | rspamd-1b94a3560cea4824cff6321e02baabb6972ecfdb.tar.gz rspamd-1b94a3560cea4824cff6321e02baabb6972ecfdb.zip |
Eliminate mess with linking.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d915bf551..fa2aa006e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,6 +92,11 @@ AddModules(MODULES_LIST WORKERS_LIST) LIST(LENGTH PLUGINSSRC RSPAMD_MODULES_NUM) ######################### LINK SECTION ############################### +ADD_LIBRARY(rspamd-server STATIC ${RSPAMD_UTIL} ${RSPAMD_LUA} ${RSPAMD_SERVER} + ${RSPAMD_STAT} ${RSPAMD_MIME} ${RSPAMD_CRYPTOBOX}) +TARGET_LINK_LIBRARIES(rspamd-server rspamd-http-parser) +TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb) + ADD_EXECUTABLE(rspamd ${RSPAMDSRC} ${PLUGINSSRC}) SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(rspamd PROPERTIES COMPILE_FLAGS "-DRSPAMD_MAIN") @@ -99,42 +104,9 @@ IF(NOT DEBIAN_BUILD) SET_TARGET_PROPERTIES(rspamd PROPERTIES VERSION ${RSPAMD_VERSION}) ENDIF(NOT DEBIAN_BUILD) -TARGET_LINK_LIBRARIES(rspamd rspamd-stat) -TARGET_LINK_LIBRARIES(rspamd rspamd-mime) TARGET_LINK_LIBRARIES(rspamd rspamd-server) -TARGET_LINK_LIBRARIES(rspamd rspamd-util) -TARGET_LINK_LIBRARIES(rspamd rspamd-lua) TARGET_LINK_LIBRARIES(rspamd stemmer) -TARGET_LINK_LIBRARIES(rspamd event) -IF(HAVE_LIBEVENT2) - TARGET_LINK_LIBRARIES(rspamd event_pthreads) -ENDIF(HAVE_LIBEVENT2) -IF(WITH_DB) - TARGET_LINK_LIBRARIES(rspamd db) -ENDIF(WITH_DB) - -IF(OPENSSL_FOUND) - TARGET_LINK_LIBRARIES(rspamd ${OPENSSL_LIBRARIES}) -ENDIF(OPENSSL_FOUND) -IF(HAVE_FETCH_H) - TARGET_LINK_LIBRARIES(rspamd fetch) -ENDIF(HAVE_FETCH_H) TARGET_LINK_LIBRARIES(rspamd ${RSPAMD_REQUIRED_LIBRARIES}) -IF(ENABLE_LUAJIT MATCHES "ON") - TARGET_LINK_LIBRARIES(rspamd "${LUAJIT_LIBRARY}") -ELSE(ENABLE_LUAJIT MATCHES "ON") - TARGET_LINK_LIBRARIES(rspamd "${LUA_LIBRARY}") -ENDIF(ENABLE_LUAJIT MATCHES "ON") - -IF(ENABLE_GPERF_TOOLS MATCHES "ON") - TARGET_LINK_LIBRARIES(rspamd profiler) -ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON") -TARGET_LINK_LIBRARIES(rspamd hiredis) -IF(GLIB_COMPAT) - TARGET_LINK_LIBRARIES(rspamd glibadditions) -ENDIF(GLIB_COMPAT) - - INSTALL(TARGETS rspamd RUNTIME DESTINATION bin) |