diff options
author | gregory guy <gregory-tde@laposte.net> | 2019-10-06 15:05:09 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-10-11 14:30:42 +0200 |
commit | c89294ff9d636159c5b16695449f256248af096f (patch) | |
tree | 5d979be96c4ce3580262f0ca6a97f5ced725dfb7 /src/CMakeLists.txt | |
parent | 074fd7751d29d66d42c7a79acd705c4fd6621933 (diff) | |
download | libcaldav-c89294ff9d636159c5b16695449f256248af096f.tar.gz libcaldav-c89294ff9d636159c5b16695449f256248af096f.zip |
Conversion to the cmake building system.
rfc4791.pdf has been moved to the doc folder.
caldav pc file has been moved in the src folder.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit 19b046ec429c32f88658352232e6cc92276dff97)
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..9b4d21d --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,74 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GTHREAD_INCLUDE_DIRS} + ${CURL_INCLUDE_DIRS} +) + + +set( _SRC caldav.c + add-caldav-object.c + delete-caldav-object.c + modify-caldav-object.c + get-caldav-report.c + get-display-name.c + caldav-utils.c + caldav-utils.h md5.c + options-caldav-server.c + lock-caldav-object.c + get-freebusy-report.c +) + + +##### caldav (shared) + +tde_add_library( caldav SHARED + + SOURCES + ${_SRC} + LINK + ${GTHREAD_LIBRARIES} + ${CURL_LIBRARIES} + + VERSION 0.0.6 + + DESTINATION ${LIB_INSTALL_DIR} +) + + +if( BUILD_CALDAV_TEST OR BUILD_UNITTEST ) +##### caldav (static) + +tde_add_library( caldav STATIC + + SOURCES + ${_SRC} + LINK + ${GTHREAD_LIBRARIES} + ${CURL_LIBRARIES} +) +endif() + + +#### pkg-config + +set( prefix ${CMAKE_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} ) +string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} ) + +configure_file( ${CMAKE_PROJECT_NAME}.pc.cmake ${CMAKE_PROJECT_NAME}.pc @ONLY ) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.pc + DESTINATION ${PKGCONFIG_INSTALL_DIR} +) + + +##### header + +install( + FILES caldav.h + DESTINATION ${INCLUDE_INSTALL_DIR}/${CMAKE_PROJECT_NAME} +) |