CMakeLists.txt 2.19 KB
Newer Older
1
cmake_minimum_required(VERSION 3.5)
2
set(PIM_VERSION "5.13.80")
Laurent Montel's avatar
Laurent Montel committed
3

4
project(Akonadi-Contact VERSION ${PIM_VERSION})
Laurent Montel's avatar
Laurent Montel committed
5
6

# ECM setup
Laurent Montel's avatar
Laurent Montel committed
7

8
set(KF5_MIN_VERSION "5.68.0")
Laurent Montel's avatar
Laurent Montel committed
9

10
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
11
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
12
set(CMAKE_CXX_STANDARD 14)
Laurent Montel's avatar
Laurent Montel committed
13

14
15
16
17
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)

Laurent Montel's avatar
Laurent Montel committed
18
19
20
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
21

Laurent Montel's avatar
Laurent Montel committed
22
23
include(ECMSetupVersion)
include(FeatureSummary)
Laurent Montel's avatar
Laurent Montel committed
24
include(ECMInstallIcons)
Laurent Montel's avatar
Laurent Montel committed
25
include(ECMQtDeclareLoggingCategory)
26

Laurent Montel's avatar
Laurent Montel committed
27

Laurent Montel's avatar
Laurent Montel committed
28
set(AKONADI_CONTACTS_VERSION ${PIM_VERSION})
29
30
set(KMIMELIB_VERSION "5.13.80")
set(AKONADI_VERSION "5.13.80")
Laurent Montel's avatar
Laurent Montel committed
31

32
set(QT_REQUIRED_VERSION "5.12.0")
Laurent Montel's avatar
Laurent Montel committed
33
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test)
Laurent Montel's avatar
Laurent Montel committed
34
########### Find packages ###########
35
36
37
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Completion ${KF5_MIN_VERSION} CONFIG REQUIRED)
38
find_package(KF5Config ${KF5_MIN_VERSION} CONFIG REQUIRED)
39
40
find_package(KF5Codecs ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
41
find_package(KF5Service ${KF5_MIN_VERSION} CONFIG REQUIRED)
42
find_package(KF5TextWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED)
43
44
find_package(KF5WidgetsAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_MIN_VERSION} CONFIG REQUIRED)
45
find_package(KF5Prison ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
46

47
48
find_package(KF5Contacts ${KF5_MIN_VERSION} CONFIG REQUIRED)

Laurent Montel's avatar
Laurent Montel committed
49
find_package(KF5Mime ${KMIMELIB_VERSION} CONFIG REQUIRED)
Daniel Vrátil's avatar
Daniel Vrátil committed
50
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
51

52

Laurent Montel's avatar
Laurent Montel committed
53
54
########### Targets ###########

55

56
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
57
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
58
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400)
59
60
endif()

Laurent Montel's avatar
Laurent Montel committed
61
add_definitions(-DQT_NO_FOREACH)
Laurent Montel's avatar
Laurent Montel committed
62

Laurent Montel's avatar
Laurent Montel committed
63
add_subdirectory(src)
Laurent Montel's avatar
Laurent Montel committed
64
add_subdirectory(kcm)
65
add_subdirectory(serializers)
Laurent Montel's avatar
Laurent Montel committed
66

67
ecm_qt_install_logging_categories(
Laurent Montel's avatar
Laurent Montel committed
68
69
70
71
72
        EXPORT AKONADICONTACTS
        FILE akonadi-contacts.categories
        DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
        )

73

74
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)