summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-04-11 21:28:43 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-04-11 21:28:43 (GMT)
commit6730ce67969d770f3b2040e010263bc5af022d8f (patch)
tree867a4eaecf5d1331b3e69d15b85a97fb052ed160
parent7151c0b18cab919608d97a8490bdae480076bc9c (diff)
downloadlibkolabxml-6730ce67969d770f3b2040e010263bc5af022d8f.tar.gz
Fix build for el5.
I couldn't find a proper fix, but the issued warnings are no problem, and this is only for el5 compatibility.
-rw-r--r--src/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e4e28fc..fe43652 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,7 +9,14 @@ add_dependencies(kolabxml generate_bindings)
target_link_libraries(kolabxml ${XERCES_C} ${Boost_LIBRARIES} ${UUID})
# For the core library we can be stricter when compiling. This doesn't work with the auto generated code though.
-set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wconversion -Wl,--no-undefined")
+if (${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.42)
+ # We can't be as strict on with older versions of boost it seems (not sure if this is the exact version number where it breaks)
+ # Since this is only for el5 compatibility we relax the rules (resulting in a couple of warning but a working build)
+ set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Wfatal-errors -Wconversion")
+else() #then normal case
+ set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wconversion -Wl,--no-undefined")
+endif()
+
set_target_properties(kolabxml PROPERTIES VERSION ${KOLABXML_VERSION} SOVERSION 0)
install(TARGETS kolabxml ${KOLAB_INSTALL_DIRECTORIES})