]> source.dussan.org Git - rspamd.git/commitdiff
Fix linking on Darwin.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Mar 2015 18:29:46 +0000 (18:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Mar 2015 18:29:46 +0000 (18:29 +0000)
test/CMakeLists.txt

index 057ff76f68ae823accb35819793418404f55bf79..1e0495c1fc167572163a298e7baf0a9213b6445a 100644 (file)
@@ -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})