1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
set(Libkolab_MODULE_DIR ${Libkolab_SOURCE_DIR}/cmake/modules)
set(CMAKE_MODULE_PATH ${Libkolab_MODULE_DIR})
set(Libkolab_VERSION_MAJOR 1)
set(Libkolab_VERSION_MINOR 0)
# Enable the full x.y.z version only for release versions
set(Libkolab_VERSION_PATCH 2)
set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR})
set(Libkolab_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolab_VERSION})
if (Qt5_POSITION_INDEPENDENT_CODE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/kolabformatV2
${Libkolabxml_INCLUDES}
./
)
configure_file(libkolab-version.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/libkolab-version.h" @ONLY)
add_subdirectory(utils)
set(KOLAB_SRCS
kolabformat/kolabobject.cpp
kolabformat/xmlobject.cpp
kolabformat/formathelpers.cpp
kolabformat/errorhandler.cpp
kolabformat/v2helpers.cpp
kolabformat/mimeobject.cpp
mime/mimeutils.cpp
conversion/kcalconversion.cpp
conversion/kabcconversion.cpp
conversion/commonconversion.cpp
conversion/kolabconversion.cpp
conversion/timezoneconverter.cpp
calendaring/calendaring.cpp
calendaring/event.cpp
calendaring/datetimeutils.cpp
icalendar/icalendar.cpp
icalendar/imip.cpp
kolabformatV2/kolabbase.cpp
kolabformatV2/contact.cpp
kolabformatV2/distributionlist.cpp
kolabformatV2/event.cpp
kolabformatV2/task.cpp
kolabformatV2/journal.cpp
kolabformatV2/incidence.cpp
kolabformatV2/note.cpp
freebusy/freebusy.cpp
)
ecm_qt_declare_logging_category(KOLAB_SRCS HEADER pimkolab_debug.h IDENTIFIER PIMKOLAB_LOG CATEGORY_NAME org.kde.pim.pimkolab
DESCRIPTION "pimkolab lib (kdepim-runtime)"
EXPORT KDEPIMRUNTIME
)
set(KOLAB_LINK_LIBRARIES
KF5::CalendarCore
KF5::CalendarUtils
KF5::Contacts
KF5::Mime
KF5::AkonadiCore
KF5::AkonadiNotes
KF5::Codecs
KF5::I18n
${Libkolabxml_LIBRARIES}
Qt5::Core
Qt5::Xml
Qt5::Gui
Qt5::Widgets
)
if(BUILD_TESTING)
#for tests only
enable_testing()
add_library(kolab_static STATIC ${KOLAB_SRCS})
target_link_libraries(kolab_static ${KOLAB_LINK_LIBRARIES} Qt5::Test)
add_subdirectory(autotests)
endif()
add_library(pimkolab STATIC ${KOLAB_SRCS})
target_link_libraries(pimkolab ${KOLAB_LINK_LIBRARIES})
|