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

cmake_minimum_required(VERSION 2.8.12)
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
9
set(KF5_VERSION "5.22.0")
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 pre)
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.45")
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.40")
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." TRUE)
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
71
set(MAILCOMMN_LIB_VERSION "5.2.40")
set(GRAVATAR_LIB_VERSION "5.2.40")
set(PIMCOMMON_LIB_VERSION "5.2.40")
set(GRANTLEETHEME_LIB_VERSION "5.2.40")
set(CALENDARSUPPORT_LIB_VERSION "5.2.40")
set(EVENTVIEW_LIB_VERSION "5.2.40")
set(LIBKDEPIM_LIB_VERSION "5.2.40")
set(KDEPIM_APPS_LIB_VERSION "5.2.40")
set(LIBKLEO_LIB_VERSION "5.2.40")
set(KDEPIMLIBS_LIB_VERSION "5.2.40")
set(GRAVATAR_LIB_VERSION "5.2.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.2.40")
set(KTNEF_LIB_VERSION "5.2.40")
Laurent Montel's avatar
Laurent Montel committed
72
set(MESSAGELIB_LIB_VERSION "5.2.76")
73
set(AKONADICALENDAR_LIB_VERSION "5.2.40")
Laurent Montel's avatar
Laurent Montel committed
74

Laurent Montel's avatar
Laurent Montel committed
75
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
76
find_package(KF5MailCommon ${MAILCOMMN_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
77
find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
78
find_package(KF5MessageViewer ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
79
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
80
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
81
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
82
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
83
find_package(KF5IncidenceEditor ${INCIDENCEEDITOR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
84
85
86
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
87
88
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
89
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
90
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
91
92
find_package(KF5Gravatar ${GRAVATAR_LIB_VERSION} CONFIG REQUIRED)

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

95
96
97
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )

Laurent Montel's avatar
Laurent Montel committed
98
# Extra package
Laurent Montel's avatar
Laurent Montel committed
99
find_package(KF5GAPI "5.1.40" CONFIG)
Laurent Montel's avatar
Laurent Montel committed
100

Laurent Montel's avatar
Laurent Montel committed
101
if (KDEPIMADDONS_BUILD_EXAMPLES)
Laurent Montel's avatar
indent    
Laurent Montel committed
102
    add_subdirectory(examples)
Laurent Montel's avatar
Laurent Montel committed
103
endif()
Laurent Montel's avatar
Laurent Montel committed
104

Laurent Montel's avatar
Laurent Montel committed
105
add_subdirectory(plugins)
106
add_subdirectory(korganizer)
Laurent Montel's avatar
Laurent Montel committed
107
108
add_subdirectory(kmail)
add_subdirectory(kaddressbook)
109
add_subdirectory(akregator)
Laurent Montel's avatar
Laurent Montel committed
110

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