CMakeLists.txt 5.52 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()

8
set(KF5_VERSION "5.35.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 )
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()

20
set(PIM_VERSION "5.5.60")
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")

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

43 44 45

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

Laurent Montel's avatar
Laurent Montel committed
50
option(KDEPIMADDONS_BUILD_EXAMPLES "Build the kdepim-addons example applications." TRUE)
51

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

54 55 56
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
57
find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
58
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
59
find_package(KF5Declarative ${KF5_VERSION} CONFIG REQUIRED)
60

61 62
set(MAILCOMMON_LIB_VERSION "5.5.40")
set(GRAVATAR_LIB_VERSION "5.5.40")
63
set(PIMCOMMON_LIB_VERSION "5.5.41")
64 65 66 67 68 69
set(GRANTLEETHEME_LIB_VERSION "5.5.40")
set(CALENDARSUPPORT_LIB_VERSION "5.5.40")
set(EVENTVIEW_LIB_VERSION "5.5.40")
set(LIBKDEPIM_LIB_VERSION "5.5.40")
set(KDEPIM_APPS_LIB_VERSION "5.5.40")
set(LIBKLEO_LIB_VERSION "5.5.40")
Laurent Montel's avatar
Laurent Montel committed
70
set(AKONADI_LIB_VERSION "5.5.42")
71 72
set(INCIDENCEEDITOR_LIB_VERSION "5.5.40")
set(KTNEF_LIB_VERSION "5.5.40")
Laurent Montel's avatar
Laurent Montel committed
73
set(MESSAGELIB_LIB_VERSION "5.5.61")
74 75 76 77
set(AKONADICALENDAR_LIB_VERSION "5.5.40")
set(CALENDAR_UTILS_VERSION "5.5.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.5.40")
set(KIMAP_LIB_VERSION "5.5.40")
Laurent Montel's avatar
Laurent Montel committed
78
set(LIBKSIEVE_LIB_VERSION_LIB "5.5.46")
79
set(KMAILTRANSPORT_LIB_VERSION "5.5.66")
Laurent Montel's avatar
Laurent Montel committed
80
set(AKONADICONTACT_LIB_VERSION "5.5.43")
Laurent Montel's avatar
Laurent Montel committed
81 82
set(IMPORTWIZARD_LIB_VERSION "5.5.42")
set(MAILIMPORTER_LIB_VERSION "5.5.40")
Laurent Montel's avatar
Laurent Montel committed
83

84 85

find_package(KF5CalendarUtils ${CALENDAR_UTILS_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
86
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
87
find_package(KF5TemplateParser ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
88
find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
89
find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
90
find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
91
find_package(KF5KaddressbookImportExport ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
92
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
93
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
94
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
95
find_package(KF5LibkdepimAkonadi ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
96
find_package(KF5IncidenceEditor ${INCIDENCEEDITOR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
97 98 99
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
100 101
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
102
find_package(KF5Akonadi ${AKONADI_LIB_VERSION} CONFIG REQUIRED)
103
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
104
find_package(KF5Gravatar ${GRAVATAR_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
105
find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
106
find_package(KF5IdentityManagement ${KIDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
107
find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
108
find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
109
find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
110
find_package(KF5MailTransportAkonadi ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
111
find_package(KF5AkonadiContact ${AKONADICONTACT_LIB_VERSION} CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
112
find_package(KPimImportWizard ${IMPORTWIZARD_LIB_VERSION} CONFIG)
Laurent Montel's avatar
Laurent Montel committed
113
find_package(KF5MailImporterAkonadi ${MAILIMPORTER_LIB_VERSION} CONFIG REQUIRED)
114 115
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
116
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
117
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
118

Laurent Montel's avatar
Laurent Montel committed
119
# Extra package
Laurent Montel's avatar
Laurent Montel committed
120
find_package(Gpgmepp 1.8.0 CONFIG)
121 122 123
set_package_properties(Gpgmepp PROPERTIES DESCRIPTION "GpgME library" URL "http://www.gnupg.org" TYPE REQUIRED)


Laurent Montel's avatar
Laurent Montel committed
124
if (KDEPIMADDONS_BUILD_EXAMPLES)
Laurent Montel's avatar
indent  
Laurent Montel committed
125
    add_subdirectory(examples)
Laurent Montel's avatar
Laurent Montel committed
126
endif()
Laurent Montel's avatar
Laurent Montel committed
127

Laurent Montel's avatar
Laurent Montel committed
128
add_subdirectory(plugins)
129
add_subdirectory(korganizer)
Laurent Montel's avatar
Laurent Montel committed
130 131
add_subdirectory(kmail)
add_subdirectory(kaddressbook)
132
add_subdirectory(akregator)
Laurent Montel's avatar
Laurent Montel committed
133
add_subdirectory(sieveeditor)
Laurent Montel's avatar
Laurent Montel committed
134
add_subdirectory(kmailtransport)
Laurent Montel's avatar
Laurent Montel committed
135 136 137
if (KPimImportWizard_FOUND)
   add_subdirectory(akonadi-import-wizard)
endif()
Laurent Montel's avatar
Laurent Montel committed
138

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