1 cmake_minimum_required(VERSION 2.8.12)
5 if(${CMAKE_SOURCE_DIR} STREQUAL ${libkdepim_SOURCE_DIR})
7 find_package(ECM 5.16.0 CONFIG REQUIRED)
8 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
10 include(GenerateExportHeader)
11 include(ECMSetupVersion)
12 include(ECMGenerateHeaders)
13 include(ECMGeneratePriFile)
14 include(ECMPackageConfigHelpers)
15 include(ECMSetupVersion)
16 include(FeatureSummary)
17 include(KDEInstallDirs)
18 include(KDECMakeSettings)
19 include(KDEFrameworkCompilerSettings)
20 include(ECMQtDeclareLoggingCategory)
23 set(KF5_VERSION "5.16.0")
24 set(KDEPIMLIBS_LIB_VERSION "5.1")
25 set(KDEPIM_LIB_VERSION "5.1")
26 set(QT_REQUIRED_VERSION "5.4.0")
27 set(KMIME_LIB_VERSION "4.87.0")
28 set(KLDAP_LIB_VERSION "4.80.0")
29 set(KCONTACTS_LIB_VERSION "4.92.0")
31 find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
32 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools DBus Network)
33 find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
34 find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
35 find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
36 find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
37 find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
38 find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
39 find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
40 find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
41 find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
42 find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
43 find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
44 find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
46 find_package(KF5AkonadiSearch "5.0.42" CONFIG REQUIRED)
47 set_package_properties(KF5AkonadiSearch PROPERTIES DESCRIPTION "The Akonadi Search libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Provides search capabilities in KMail and Akonadi")
50 ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX LIBKDEPIM
51 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h"
52 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
55 remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
57 ########### CMake Config Files ###########
58 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")
60 ecm_configure_package_config_file(
61 "${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimConfig.cmake.in"
62 "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
63 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
67 "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
68 "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
69 DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
73 ecm_configure_package_config_file(MailTransportDBusServiceConfig.cmake.in
74 ${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
75 PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR
76 INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_PREFIX}/MailTransportDBusService")
79 ${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
80 DESTINATION "${CMAKECONFIG_INSTALL_PREFIX}/MailTransportDBusService")
82 install(EXPORT KF5LibkdepimTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimTargets.cmake NAMESPACE KF5::)
85 ${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h
86 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
89 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
92 ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX LIBKDEPIM
93 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h"
94 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
101 add_subdirectory(tests)