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

5
set(KF5_MIN_VERSION "5.65.0")
6
set(RELEASE_SERVICE_VERSION "20.03.70")
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
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
set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSION})")
Laurent Montel's avatar
Laurent Montel committed
39 40 41
set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
set(KDEPIM_LIB_SOVERSION "5")

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

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

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

# Find KF5 package
56 57 58 59 60 61 62 63 64
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
65 66 67 68 69 70 71 72 73 74

# 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
75 76 77 78
# Fix plugin support for removing theses dependancies
find_package(KF5AkonadiMime ${AKONADI_MIMELIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)

79
include_directories(${akregator_SOURCE_DIR} ${akregator_BINARY_DIR})
Laurent Montel's avatar
Laurent Montel committed
80
add_definitions(-DTRANSLATION_DOMAIN=\"akregator\")
81
set(CMAKE_CXX_STANDARD 14)
82
add_definitions(-DQT_NO_FOREACH)
83 84
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
85
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
86
endif()
Laurent Montel's avatar
Laurent Montel committed
87

88 89 90 91 92
add_subdirectory(export)
add_subdirectory(interfaces)
add_subdirectory(plugins)
add_subdirectory(configuration)
add_subdirectory(src)
93
add_subdirectory(kontactplugin)
94
add_subdirectory(kconf_update)
Laurent Montel's avatar
Laurent Montel committed
95

96
install(FILES akregator.renamecategories akregator.categories  DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
Laurent Montel's avatar
Laurent Montel committed
97

Laurent Montel's avatar
Laurent Montel committed
98 99
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)