CMakeLists.txt 4.17 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
2
project(kdepim-addons)

Laurent Montel's avatar
Laurent Montel committed
3
cmake_minimum_required(VERSION 3.1)
Laurent Montel's avatar
Laurent Montel committed
4
5
6
7
if (POLICY CMP0063)
    cmake_policy(SET CMP0063 NEW)
endif()

Laurent Montel's avatar
Laurent Montel committed
8
set(KF5_VERSION "5.23.0")
Laurent Montel's avatar
Laurent Montel committed
9
find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
10
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
Laurent Montel's avatar
Laurent Montel committed
11
12

# Do NOT add quote
Laurent Montel's avatar
Laurent Montel committed
13
set(KDEPIMADDONS_DEV_VERSION beta1)
Laurent Montel's avatar
Laurent Montel committed
14
15
16

# add an extra space
if(DEFINED KDEPIMADDONS_DEV_VERSION)
Laurent Montel's avatar
indent    
Laurent Montel committed
17
    set(KDEPIMADDONS_DEV_VERSION " ${KDEPIMADDONS_DEV_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
18
19
endif()

Laurent Montel's avatar
Laurent Montel committed
20
set(PIM_VERSION "5.2.90")
Laurent Montel's avatar
Laurent Montel committed
21
22

set(KDEPIMADDONS_VERSION_NUMBER ${PIM_VERSION})
Laurent Montel's avatar
Laurent Montel committed
23
24
25
26
27
set(KDEPIMADDONS_VERSION "${KDEPIMADDONS_VERSION_NUMBER}${KDEPIMADDONS_DEV_VERSION}")

set(KDEPIMADDONS_LIB_VERSION "${KDEPIMADDONS_VERSION_NUMBER}")
set(KDEPIMADDONS_LIB_SOVERSION "5")

Laurent Montel's avatar
Laurent Montel committed
28
set(AKONADINOTES_LIB_VERSION "5.2.90")
29
set(QT_REQUIRED_VERSION "5.6.0")
30
31
32
33
34
35
36
37
38
39
40
41
42
43
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMAddTests)
include(ECMMarkNonGuiExecutable)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(CMakePackageConfigHelpers)
include(FeatureSummary)
include(CheckFunctionExists)
include(ECMGeneratePriFile)

include(KDEInstallDirs)
include(KDECMakeSettings)
Laurent Montel's avatar
Laurent Montel committed
44
include(KDECompilerSettings NO_POLICY_SCOPE)
45
46
47
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)

48
option(KDEPIMADDONS_BUILD_EXAMPLES "Build the kdepim-addons example applications." FALSE)
49

Laurent Montel's avatar
Laurent Montel committed
50
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED WebEngine WebEngineWidgets Widgets Test)
Laurent Montel's avatar
Laurent Montel committed
51

52
53
54
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
55
find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
56
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
57
find_package(KF5Declarative ${KF5_VERSION} CONFIG REQUIRED)
58

Laurent Montel's avatar
Laurent Montel committed
59
60
61
62
63
64
65
66
67
68
69
70
set(MAILCOMMON_LIB_VERSION "5.2.90")
set(GRAVATAR_LIB_VERSION "5.2.90")
set(PIMCOMMON_LIB_VERSION "5.2.90")
set(GRANTLEETHEME_LIB_VERSION "5.2.90")
set(CALENDARSUPPORT_LIB_VERSION "5.2.90")
set(EVENTVIEW_LIB_VERSION "5.2.90")
set(LIBKDEPIM_LIB_VERSION "5.2.90")
set(KDEPIM_APPS_LIB_VERSION "5.2.90")
set(LIBKLEO_LIB_VERSION "5.2.90")
set(AKONADI_LIB_VERSION "5.2.90")
set(INCIDENCEEDITOR_LIB_VERSION "5.2.90")
set(KTNEF_LIB_VERSION "5.2.90")
Laurent Montel's avatar
Laurent Montel committed
71
set(MESSAGELIB_LIB_VERSION "5.2.93")
Laurent Montel's avatar
Laurent Montel committed
72
73
set(AKONADICALENDAR_LIB_VERSION "5.2.90")
set(CALENDAR_UTILS_VERSION "5.2.90")
Laurent Montel's avatar
Laurent Montel committed
74

75
76

find_package(KF5CalendarUtils ${CALENDAR_UTILS_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
77
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
78
find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
79
find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
80
find_package(KF5MessageViewer ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
81
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
82
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
83
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
84
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
85
find_package(KF5IncidenceEditor ${INCIDENCEEDITOR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
86
87
88
find_package(KF5MessageCore ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5MessageList ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
89
90
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
91
find_package(KF5Akonadi ${AKONADI_LIB_VERSION} CONFIG REQUIRED)
92
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
93
94
find_package(KF5Gravatar ${GRAVATAR_LIB_VERSION} CONFIG REQUIRED)

Laurent Montel's avatar
Laurent Montel committed
95
96
find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)

97
98
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
99
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
100

Laurent Montel's avatar
Laurent Montel committed
101
# Extra package
Laurent Montel's avatar
Laurent Montel committed
102
find_package(KF5GAPI "5.1.40" CONFIG)
Laurent Montel's avatar
Laurent Montel committed
103

Laurent Montel's avatar
Laurent Montel committed
104
if (KDEPIMADDONS_BUILD_EXAMPLES)
Laurent Montel's avatar
indent    
Laurent Montel committed
105
    add_subdirectory(examples)
Laurent Montel's avatar
Laurent Montel committed
106
endif()
Laurent Montel's avatar
Laurent Montel committed
107

Laurent Montel's avatar
Laurent Montel committed
108
add_subdirectory(plugins)
109
add_subdirectory(korganizer)
Laurent Montel's avatar
Laurent Montel committed
110
111
add_subdirectory(kmail)
add_subdirectory(kaddressbook)
112
add_subdirectory(akregator)
Laurent Montel's avatar
Laurent Montel committed
113
add_subdirectory(sieveeditor)
Laurent Montel's avatar
Laurent Montel committed
114

Laurent Montel's avatar
Laurent Montel committed
115
install( FILES kdepim-addons.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
Laurent Montel's avatar
Laurent Montel committed
116
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)