Page MenuHomePhorge

CMakeLists.txt
No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None

CMakeLists.txt

SET_SOURCE_FILES_PROPERTIES(${SCHEMA_SOURCEFILES} PROPERTIES GENERATED 1)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wp,-D_FORTIFY_SOURCE=2 -O2" ) #always generate shared libraries with -fPIC, -D_FORTIFY_SOURCE=2 enables some extra checking
#Library with serialization/deserialization code and kolab-containers
add_library(kolabxml SHARED kolabformat.cpp kolabcontainers.cpp kolabnote.cpp kolabevent.cpp kolabtodo.cpp kolabjournal.cpp kolabcontact.cpp utils.cpp base64.cpp ../compiled/XMLParserWrapper.cpp ../compiled/grammar-input-stream.cxx ${SCHEMA_SOURCEFILES})
target_link_libraries(kolabxml ${XERCES_C} ${Boost_LIBRARIES})
#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 -Wl,--no-undefined")
set_target_properties(kolabxml PROPERTIES VERSION 3.0.0 SOVERSION 0)
install(TARGETS kolabxml LIBRARY DESTINATION lib)
install( FILES
kolabformat.h
kolabevent.h
kolabtodo.h
kolabjournal.h
kolabcontact.h
kolabnote.h
kolabcontainers.h
global_definitions.h
DESTINATION include/kolab COMPONENT Devel)
#----- The following makes sure libkolabxml is found in the install directory for installed files and not in the build directory (for libraries which link to libkolabxml)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already(but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
#----- KCalCore libs
if(KDECORE_FOUND AND KCALCORE_FOUND)
message("Building KCalCore dependend libraries.")
#Library with converters to/from kcalcore and code to provide advanced functionality (such as expanding recurrences) from kcalcore.
add_library(kolabkcal SHARED kolabkcalconversion.cpp calendaring.cpp)
target_link_libraries(kolabkcal kolabxml ${KCALCORE} ${KDECORE})
set_target_properties(kolabkcal PROPERTIES VERSION 0.1.0 SOVERSION 0)
install(TARGETS kolabkcal LIBRARY DESTINATION lib)
install( FILES
kolabkcalconversion.h
calendaring.h
DESTINATION include/kolab COMPONENT Devel)
else()
message(WARNING "Could not build KCalCore/KDElibs dependend libraries, because kdepimlibs/kdelibs is missing.")
endif()
#-----------------------SWIG--------------------
if (SWIG_FOUND)
add_subdirectory(python)
add_subdirectory(php)
else()
message(WARNING "Could not build SWIG bindings, because SWIG is missing.")
endif()

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 5, 9:57 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831327
Default Alt Text
CMakeLists.txt (3 KB)

Event Timeline