CMakeLists.txt 3.92 KB
Newer Older
1
cmake_minimum_required(VERSION 3.5)
2
3
set(PIM_VERSION "5.14.40")
project(akregator VERSION ${PIM_VERSION})
Laurent Montel's avatar
Laurent Montel committed
4

5
set(KF5_MIN_VERSION "5.68.0")
Laurent Montel's avatar
Laurent Montel committed
6
set(RELEASE_SERVICE_VERSION "20.07.40")
Laurent Montel's avatar
Laurent Montel committed
7

8
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
9
10
11
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(ECMInstallIcons)

12

Laurent Montel's avatar
Laurent Montel committed
13
14
include(ECMSetupVersion)
include(ECMAddTests)
15

Laurent Montel's avatar
Laurent Montel committed
16
17
include(GenerateExportHeader)
include(ECMGenerateHeaders)
18

Laurent Montel's avatar
Laurent Montel committed
19
20
21
22
23
24
include(FeatureSummary)
include(CheckFunctionExists)
include(ECMGeneratePriFile)

include(KDEInstallDirs)
include(KDECMakeSettings)
25
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
26
27
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
28

29

Laurent Montel's avatar
Laurent Montel committed
30
# Do NOT add quote
Laurent Montel's avatar
Laurent Montel committed
31
set(KDEPIM_DEV_VERSION alpha)
Laurent Montel's avatar
Laurent Montel committed
32
33
34

# add an extra space
if(DEFINED KDEPIM_DEV_VERSION)
35
  set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
36
endif()
Laurent Montel's avatar
Laurent Montel committed
37

38
39
set(KDEPIM_VERSION "${PIM_VERSION}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSION})")
set(KDEPIM_LIB_VERSION "${PIM_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
40
41
set(KDEPIM_LIB_SOVERSION "5")

42
set(QT_REQUIRED_VERSION "5.12.0")
Laurent Montel's avatar
Laurent Montel committed
43

44
set(KONTACTINTERFACE_LIB_VERSION "5.14.42")
Laurent Montel's avatar
Laurent Montel committed
45
46
47
48
49
50
set(KPIMTEXTEDIT_LIB_VERSION "5.14.40")
set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.14.40")
set(LIBKDEPIM_LIB_VERSION_LIB "5.14.40")
set(LIBKLEO_LIB_VERSION_LIB "5.14.40")
set(MESSAGELIB_LIB_VERSION_LIB "5.14.40")
set(PIMCOMMON_LIB_VERSION_LIB "5.14.40")
Laurent Montel's avatar
Laurent Montel committed
51

52
53
54
option(KDEPIM_KUSERFEEDBACK "Enable user feedback support (experimental)" FALSE)


55
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test WebEngine WebEngineWidgets PrintSupport)
Laurent Montel's avatar
Laurent Montel committed
56
find_package(Grantlee5 "5.2" CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
57
58

# Find KF5 package
59
60
61
62
63
64
65
66
67
find_package(KF5Crash ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5DocTools ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5KCMUtils ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5NotifyConfig ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Parts ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5TextEditor ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Notifications ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Syndication ${KF5_MIN_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
68
69
70
71
72
73
74
75
76
77

# Find KdepimLibs Package
find_package(KF5GrantleeTheme ${LIBGRANTLEETHEME_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5KontactInterface ${KONTACTINTERFACE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)

Laurent Montel's avatar
Laurent Montel committed
78
79
80
81
# Fix plugin support for removing theses dependancies
find_package(KF5AkonadiMime ${AKONADI_MIMELIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)

82
find_package(KUserFeedback 0.9.90 CONFIG) # Needs Provider::describeDataSources()
Laurent Montel's avatar
Laurent Montel committed
83
set_package_properties(KUserFeedback PROPERTIES DESCRIPTION "User Feedback lib" TYPE OPTIONAL PURPOSE "Allow to send Telemetry Information (optional). It can be disable in apps.")
84
85


86
include_directories(${akregator_SOURCE_DIR} ${akregator_BINARY_DIR})
Laurent Montel's avatar
Laurent Montel committed
87
add_definitions(-DTRANSLATION_DOMAIN=\"akregator\")
88
set(CMAKE_CXX_STANDARD 14)
89
add_definitions(-DQT_NO_FOREACH)
90
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
91
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
92
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400)
93
endif()
Laurent Montel's avatar
Laurent Montel committed
94
95
96
if (TARGET KUserFeedbackWidgets)
    add_definitions(-DWITH_KUSERFEEDBACK)
endif()
97
98
99
100
101
add_subdirectory(export)
add_subdirectory(interfaces)
add_subdirectory(plugins)
add_subdirectory(configuration)
add_subdirectory(src)
102
add_subdirectory(kontactplugin)
103
add_subdirectory(kconf_update)
Laurent Montel's avatar
Laurent Montel committed
104

105
ecm_qt_install_logging_categories(
Laurent Montel's avatar
Laurent Montel committed
106
107
108
109
        EXPORT AKREGATOR
        FILE akregator.categories
        DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
        )
Laurent Montel's avatar
Laurent Montel committed
110
111
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)