diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-29 20:35:00 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-29 20:35:00 +0400 |
commit | 4c4773d96b1b2a157009590908fce032696281c5 (patch) | |
tree | c9709f5a21b4eafbfee04327884cb5c6d39006e4 /lib/CMakeLists.txt | |
parent | 513e304bc6255492eee5c78c97d222037087f429 (diff) | |
download | rspamd-4c4773d96b1b2a157009590908fce032696281c5.tar.gz rspamd-4c4773d96b1b2a157009590908fce032696281c5.zip |
* Fix build under CentOS 5 with old glib 2.12
* Fix build of rspamd with CMAKE_BINARY_DIR differs from CMAKE_SOURCE_DIR
Rework include style.
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r-- | lib/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a8d0527f1..655e02303 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -3,9 +3,9 @@ SET(LIBRSPAMDSRC librspamdclient.c ../src/mem_pool.c ../src/upstream.c ../sr 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 PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "librspamdclient.h") -SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I../src/") +SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES}) TARGET_LINK_LIBRARIES(rspamdclient ${GLIB2_LIBRARIES}) @@ -16,6 +16,11 @@ TARGET_LINK_LIBRARIES(rspamdclient_static ${GLIB2_LIBRARIES}) SET_TARGET_PROPERTIES(rspamdclient PROPERTIES VERSION ${RSPAMD_VERSION}) SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES VERSION ${RSPAMD_VERSION}) +IF(GLIB_COMPAT) + INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/contrib/lgpl") + TARGET_LINK_LIBRARIES(rspamdclient glibadditions) +ENDIF(GLIB_COMPAT) + INSTALL(TARGETS rspamdclient rspamdclient_static LIBRARY PUBLIC_HEADER LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include |