CMakeLists.txt 2.77 KB
Newer Older
1
cmake_minimum_required(VERSION 3.5)
Laurent Montel's avatar
Laurent Montel committed
2
set(PIM_VERSION "5.11.1")
3
project(kdepim-apps-lib VERSION ${PIM_VERSION})
4

Laurent Montel's avatar
Laurent Montel committed
5
set(KF5_MIN_VERSION "5.56.0")
6

7
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
8
9
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
Laurent Montel's avatar
Laurent Montel committed
10
11
12
13
if (POLICY CMP0053)
    cmake_policy(SET CMP0053 NEW)
endif()

14
15
16
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
17

18
19
20
21
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
22
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
23
24
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
25

Laurent Montel's avatar
Laurent Montel committed
26

27

Laurent Montel's avatar
Laurent Montel committed
28
set(KDEPIM_APPS_LIB_VERSION ${PIM_VERSION})
29

30
set(QT_REQUIRED_VERSION "5.10.0")
31

Laurent Montel's avatar
Laurent Montel committed
32
33
34
35
36
37
set(AKONADI_VERSION "5.11.1")
set(GRANTLEETHEME_LIB_VERSION "5.11.1")
set(KCONTACTS_LIB_VERSION "5.11.1")
set(AKONADICONTACT_LIB_VERSION "5.11.1")
set(LIBKLEO_LIB_VERSION "5.11.1")
set(PIMCOMMON_LIB_VERSION "5.11.1")
38

Laurent Montel's avatar
Laurent Montel committed
39
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets DBus Gui)
40

41
42
43
44
45
46
47
48
find_package(KF5Config ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5CoreAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Service ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5WidgetsAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
49
50

find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
51
find_package(KF5AkonadiContact ${AKONADICONTACT_LIB_VERSION} CONFIG REQUIRED)
52
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
53
54
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
55
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
56
57

find_package(Grantlee5 "5.1" CONFIG REQUIRED)
58

59
find_package(KF5Prison ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
60

61
if(BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
62
    find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
Laurent Montel's avatar
Indent    
Laurent Montel committed
63
    add_definitions(-DBUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
64
endif()
Laurent Montel's avatar
Laurent Montel committed
65
66
67
68
69
70
# workaround for https://bugreports.qt.io/browse/QTBUG-74665 (bug in qt5.13 reevaluate it)
if (${Qt5Widgets_VERSION} STRGREATER "5.13")
   MESSAGE(STATUS "Qt version: ${Qt5Widgets_VERSION} DISABLE compile without deprecated methods. bug QTBUG-74665")
else()
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
71

72
73
74
75
add_subdirectory(libfollowupreminder)
add_subdirectory(libkdepimdbusinterfaces)
add_subdirectory(libsendlater)
add_subdirectory(kaddressbookgrantlee)
76
add_subdirectory(kaddressbookimportexport)
77
78
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

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