CMakeLists.txt 2.58 KB
Newer Older
1
cmake_minimum_required(VERSION 3.0)
2
set(PIM_VERSION "5.5.40")
3
project(kdepim-apps-lib VERSION ${PIM_VERSION})
4

5
set(KF5_VERSION "5.34.0")
Laurent Montel's avatar
Laurent Montel committed
6
find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
7 8 9 10 11
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
12
include(CMakePackageConfigHelpers)
13 14 15 16
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
17
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
18 19
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
Laurent Montel's avatar
Laurent Montel committed
20 21
include(ECMCoverageOption)

22

Laurent Montel's avatar
Laurent Montel committed
23
set(KDEPIM_APPS_LIB_VERSION ${PIM_VERSION})
24

25
set(QT_REQUIRED_VERSION "5.7.0")
26

27 28 29
set(AKONADI_VERSION "5.5.40")
set(GRANTLEETHEME_LIB_VERSION "5.5.40")
set(KCONTACTS_LIB_VERSION "5.5.40")
Laurent Montel's avatar
Laurent Montel committed
30
set(AKONADICONTACT_LIB_VERSION "5.5.41")
31 32
set(LIBKLEO_LIB_VERSION "5.5.40")
set(PIMCOMMON_LIB_VERSION "5.5.40")
33

34 35 36 37 38
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test DBus Gui)

find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
39 40
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
41
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
42
find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
43 44 45
find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)

find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
46
find_package(KF5AkonadiContact ${AKONADICONTACT_LIB_VERSION} CONFIG REQUIRED)
47
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
48 49
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
50
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
51 52

find_package(Grantlee5 "5.1" CONFIG REQUIRED)
53

54
find_package(KF5Prison ${KF5_VERSION})
Laurent Montel's avatar
Laurent Montel committed
55 56 57 58 59 60
set_package_properties(Prison PROPERTIES
    DESCRIPTION "Prison"
    URL "http://projects.kde.org/prison"
    TYPE OPTIONAL
    PURPOSE "Needed to show mobile barcodes of your contacts")

61 62 63
if(BUILD_TESTING)
   add_definitions(-DBUILD_TESTING)
endif(BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
64
add_definitions( -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 )
65 66 67 68
add_subdirectory(libfollowupreminder)
add_subdirectory(libkdepimdbusinterfaces)
add_subdirectory(libsendlater)
add_subdirectory(kaddressbookgrantlee)
69
add_subdirectory(kaddressbookimportexport)
70 71
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

Laurent Montel's avatar
Laurent Montel committed
72
install( FILES kdepim-apps-lib.renamecategories kdepim-apps-lib.categories DESTINATION ${KDE_INSTALL_CONFDIR} )