]> source.dussan.org Git - rspamd.git/commitdiff
Update build and install system.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 2 Feb 2011 13:16:51 +0000 (16:16 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 2 Feb 2011 13:16:51 +0000 (16:16 +0300)
CMakeLists.txt
lib/CMakeLists.txt
src/client/CMakeLists.txt

index 3d01c636a2365856457d2974eb3b1cde782abc82..1437166a87961df7ccaec7a6333fb47464dc1158 100644 (file)
@@ -759,9 +759,7 @@ ENDIF(ENABLE_STATIC MATCHES "ON")
 ##################### INSTALLATION ##########################################
 
 # Binaries
-INSTALL(PROGRAMS rspamd-${RSPAMD_VERSION} DESTINATION bin RENAME rspamd)
-INSTALL(PROGRAMS src/client/rspamc DESTINATION bin)
-
+INSTALL(TARGETS rspamd RUNTIME DESTINATION bin)
 
 # Configs
 IF(NOT EXISTS ${DESTDIR}/${ETC_PREFIX}/rspamd)
@@ -812,9 +810,9 @@ IF(ENABLE_PERL MATCHES "ON")
 ENDIF(ENABLE_PERL MATCHES "ON")
 
 # Redirector
-IF(ENABLE_REDIRECTOR MATCHES "ON" AND ENABLE_PERL MATCHES "ON")
+IF(ENABLE_REDIRECTOR MATCHES "ON")
        INSTALL(PROGRAMS utils/redirector.pl DESTINATION bin RENAME rspamd-redirector)
-ENDIF(ENABLE_REDIRECTOR MATCHES "ON" AND ENABLE_PERL MATCHES "ON")
+ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
 
 # Start scripts
 IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT BUILD_PORT)
@@ -925,4 +923,4 @@ IF(DPKG_FOUND STREQUAL "YES")
 ENDIF(DPKG_FOUND STREQUAL "YES")
 IF(PKGCREATE_FOUND STREQUAL "YES")
     ADD_FREEBSD_PACKAGE("rspamd" "freebsd/rspamd.plist")    
-ENDIF(PKGCREATE_FOUND STREQUAL "YES")
\ No newline at end of file
+ENDIF(PKGCREATE_FOUND STREQUAL "YES")
index f625b2833b7fa8ede7cb87ffaa1e024abe254ab1..5b30f041bb529c3393fecba97cf4e837bee022f7 100644 (file)
@@ -4,4 +4,18 @@ SET(LIBRSPAMDSRC                         librspamdclient.c ../src/util.c ../src/upstream.c ../src/me
 ADD_LIBRARY(rspamdclient SHARED ${LIBRSPAMDSRC})
 ADD_LIBRARY(rspamdclient_static STATIC ${LIBRSPAMDSRC})
 SET_TARGET_PROPERTIES(rspamdclient PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I../src/")
-SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I../src/")
\ No newline at end of file
+SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "librspamdclient.h")
+SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I../src/")
+
+TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamdclient ${GLIB2_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamdclient_static ${CMAKE_REQUIRED_LIBRARIES})
+TARGET_LINK_LIBRARIES(rspamdclient_static ${GLIB2_LIBRARIES})
+
+SET_TARGET_PROPERTIES(rspamdclient PROPERTIES VERSION ${RSPAMD_VERSION})
+SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES VERSION ${RSPAMD_VERSION})
+
+INSTALL(TARGETS rspamdclient rspamdclient_static LIBRARY PUBLIC_HEADER 
+    LIBRARY DESTINATION lib 
+    PUBLIC_HEADER DESTINATION include
+    ARCHIVE DESTINATION lib)
index 186b458f31f62330f2d18d422e6ee1eead77dc69..dee29b667a8f50898e7fad630adb914adff2c4bf 100644 (file)
@@ -6,3 +6,6 @@ SET_TARGET_PROPERTIES(rspamc PROPERTIES COMPILE_FLAGS "-I.. -I../../lib")
 TARGET_LINK_LIBRARIES(rspamc rspamdclient)
 TARGET_LINK_LIBRARIES(rspamc ${CMAKE_REQUIRED_LIBRARIES})
 TARGET_LINK_LIBRARIES(rspamc ${GLIB2_LIBRARIES})
+SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION})
+
+INSTALL(TARGETS rspamc RUNTIME DESTINATION bin)