aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-23 14:45:33 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-23 14:45:33 +0400
commit18ce6f0c60f1125c5344d9fd8e90e5ea2941bf01 (patch)
treeeb79d0b925375a19aae1f7e88323621990c72150 /CMakeLists.txt
parent80e9384ebfaca000eb7f0693a466795f51e3f29d (diff)
downloadrspamd-18ce6f0c60f1125c5344d9fd8e90e5ea2941bf01.tar.gz
rspamd-18ce6f0c60f1125c5344d9fd8e90e5ea2941bf01.zip
* Fix compatibility issues
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab2e11ce0..1605bd41b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,18 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -DSOLARIS")
+ IF(NOT ETC_PREFIX)
+ SET(ETC_PREFIX /etc)
+ SET(PREFIX /opt/rspamd)
+ ENDIF(NOT ETC_PREFIX)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES m)
+ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+
IF(ENABLE_PERL MATCHES "ON")
IF(NOT PERL_EXECUTABLE)
@@ -570,6 +582,7 @@ ENDIF(LIBJUDY_LIBRARY)
TARGET_LINK_LIBRARIES(rspamd rspamd_evdns)
TARGET_LINK_LIBRARIES(rspamd event)
TARGET_LINK_LIBRARIES(rspamd rspamd_json)
+TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd ${GLIB2_LIBRARIES})
IF(GMIME2_FOUND)
TARGET_LINK_LIBRARIES(rspamd ${GMIME2_LIBRARIES})
@@ -588,6 +601,7 @@ ADD_EXECUTABLE(test/rspamd-test ${TESTDEPENDS} ${CONTRIBSRC} ${TESTSRC})
SET_TARGET_PROPERTIES(test/rspamd-test PROPERTIES LINKER_LANGUAGE C)
TARGET_LINK_LIBRARIES(test/rspamd-test event)
TARGET_LINK_LIBRARIES(test/rspamd-test ${GLIB2_LIBRARIES})
+TARGET_LINK_LIBRARIES(test/rspamd-test ${CMAKE_REQUIRED_LIBRARIES})
IF(GMIME2_FOUND)
TARGET_LINK_LIBRARIES(test/rspamd-test ${GMIME2_LIBRARIES})
ELSE(GMIME2_FOUND)
@@ -599,6 +613,7 @@ ENDIF(ENABLE_STATIC MATCHES "ON")
ADD_EXECUTABLE(utils/url-extracter ${UTILSDEPENDS} ${CONTRIBSRC} ${UTILSSRC})
SET_TARGET_PROPERTIES(utils/url-extracter PROPERTIES LINKER_LANGUAGE C)
+TARGET_LINK_LIBRARIES(utils/url-extracter ${CMAKE_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(utils/url-extracter ${GLIB2_LIBRARIES})
IF(GMIME2_FOUND)
TARGET_LINK_LIBRARIES(utils/url-extracter ${GMIME2_LIBRARIES})
@@ -611,7 +626,7 @@ ENDIF(ENABLE_STATIC MATCHES "ON")
ADD_EXECUTABLE(utils/expression-parser ${UTILSDEPENDS} ${CONTRIBSRC} ${EXPRSRC})
SET_TARGET_PROPERTIES(utils/expression-parser PROPERTIES LINKER_LANGUAGE C)
-TARGET_LINK_LIBRARIES(utils/expression-parser m)
+TARGET_LINK_LIBRARIES(utils/expression-parser ${CMAKE_REQUIRED_LIBRARIES})
IF(LIBUTIL_LIBRARY)
TARGET_LINK_LIBRARIES(utils/expression-parser util)
ENDIF(LIBUTIL_LIBRARY)