From: Vsevolod Stakhov Date: Thu, 5 Mar 2015 18:29:46 +0000 (+0000) Subject: Fix linking on Darwin. X-Git-Tag: 0.9.0~552 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=afbe7a857b990fc524573f402131c0453e4a0104;p=rspamd.git Fix linking on Darwin. --- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 057ff76f6..1e0495c1f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,11 @@ ADD_EXECUTABLE(rspamd-test EXCLUDE_FROM_ALL ${TESTSRC}) SET_TARGET_PROPERTIES(rspamd-test PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(rspamd-test PROPERTIES COMPILE_FLAGS "-DRSPAMD_TEST") ADD_DEPENDENCIES(rspamd-test rspamd-server) -TARGET_LINK_LIBRARIES(rspamd-test "-Wl,-whole-archive ../src/librspamd-server.a -Wl,-no-whole-archive") +IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + TARGET_LINK_LIBRARIES(rspamd-test "-Wl,-whole-archive ../src/librspamd-server.a -Wl,-no-whole-archive") +ELSE(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + TARGET_LINK_LIBRARIES(rspamd-test rspamd-server) +ENDIF(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") TARGET_LINK_LIBRARIES(rspamd-test rspamd-cdb) TARGET_LINK_LIBRARIES(rspamd-test rspamd-http-parser) TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES})