3 cmake_minimum_required(VERSION 3.1)
4 option(KDEPIM_SUPERBUILD "Build standalone apps (experimental not used for distro)" FALSE)
7 # Remove it when splitted
8 # This CMakeLists.txt is a "superbuild" for the frameworks.
9 # This means it can be used to build them all standalone one-by-one.
10 # This is useful to compile all them with one command.
11 # use mkdir build && cd build && cmake -DKDEPIM_SUPERBUILD=TRUE ../ && make -j8 sb_all
13 include(SuperBuild.cmake)
15 sb_add_project(grantleeeditor)
18 sb_add_project(korganizer)
19 sb_add_project(sieveeditor)
20 sb_add_project(storageservicemanager)
21 sb_add_project(akregator)
22 sb_add_project(importwizard)
23 sb_add_project(kaddressbook)
24 sb_add_project(mboximporter)
25 sb_add_project(knotes)
27 sb_add_project(pimsettingexporter)
28 sb_add_project(kalarm)
29 sb_add_project(blogilo)
32 sb_add_project(kontact)
34 sb_add_project(akonadiconsole)
35 sb_add_project(console)
37 sb_add_project(accountwizard)
39 # doc must be a subdir of kdepim or packagers will kill us
40 # Need to move in subdirectory add_subdirectory(doc)
47 cmake_policy(SET CMP0063 NEW)
51 set(LIBRARY_NAMELINK LIBRARY NAMELINK_SKIP)
53 # we need some parts of the ECM CMake helpers
54 set(KF5_VERSION "5.23.0")
55 find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
56 set(CMAKE_MODULE_PATH ${kdepim_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
57 include(ECMOptionalAddSubdirectory)
58 include(ECMInstallIcons)
59 include(ECMSetupVersion)
61 include(ECMMarkNonGuiExecutable)
62 include(GenerateExportHeader)
63 include(ECMGenerateHeaders)
64 include(CMakePackageConfigHelpers)
65 include(FeatureSummary)
66 include(CheckFunctionExists)
67 include(ECMGeneratePriFile)
69 include(KDEInstallDirs)
70 include(KDECMakeSettings)
71 include(KDECompilerSettings NO_POLICY_SCOPE)
72 include(ECMAddAppIcon)
73 include(ECMQtDeclareLoggingCategory)
76 # Version scheme: "x.y.z build".
78 # x is the version number.
79 # y is the major release number.
80 # z is the minor release number.
82 # "x.y.z" follow the kdelibs version kdepim is released with.
84 # If "z" is 0, the version is "x.y"
86 # KDEPIM_DEV_VERSION is empty for final versions.
87 # For development versions "build" is something like "pre", "alpha1", "alpha2", "beta1", "beta2", "rc1", "rc2".
89 # Examples in chronological order:
90 # 3.0, 3.0.1, 3.1 alpha1, 3.1 beta1, 3.1 beta2, 3.1 rc1, 3.1, 3.1.1, 3.2 pre, 3.2 alpha1
93 set(KDEPIM_DEV_VERSION pre)
96 if(DEFINED KDEPIM_DEV_VERSION)
97 set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
100 set(KDEPIM_VERSION_NUMBER "5.2.80")
101 set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
104 set(KDEPIMLIBS_LIB_VERSION "5.2.80")
105 set(KCONTACTS_LIB_VERSION "5.2.80")
106 set(KCALENDARCORE_LIB_VERSION "5.2.80")
107 set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.80")
108 set(KLDAP_LIB_VERSION "5.2.80")
109 set(KMAILTRANSPORT_LIB_VERSION "5.2.80")
110 set(CALENDARUTILS_LIB_VERSION "5.2.80")
111 set(KHOLIDAYS_LIB_VERSION "5.2.80")
112 set(KTNEF_LIB_VERSION "5.2.80")
113 set(KIMAP_LIB_VERSION "5.2.80")
114 set(KMBOX_LIB_VERSION "5.2.80")
115 set(AKONADICALENDAR_LIB_VERSION "5.2.80")
116 set(SYNDICATION_LIB_VERSION "5.2.80")
117 set(GPGMEPP_LIB_VERSION "5.2.80")
118 set(KONTACTINTERFACE_LIB_VERSION "5.2.80")
119 set(AKONADIKALARM_LIB_VERSION "5.2.80")
120 set(KMIME_LIB_VERSION "5.2.80")
121 set(XMLRPCCLIENT_LIB_VERSION "5.2.80")
122 set(KBLOG_LIB_VERSION "5.2.80")
123 set(KPIMTEXTEDIT_LIB_VERSION "5.2.80")
124 set(AKONADI_VERSION "5.2.80")
126 set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
127 set(KDEPIM_LIB_SOVERSION "5")
128 set(AKONADINOTES_LIB_VERSION "5.2.80")
130 set(QT_REQUIRED_VERSION "5.6.0")
131 option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
132 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Sql Concurrent UiTools WebEngine WebEngineWidgets)
133 find_package(Qt5X11Extras NO_MODULE)
134 find_package(Grantlee5 "5.1" CONFIG REQUIRED)
135 set(LIBGRAVATAR_VERSION_LIB "5.2.80")
136 set(LIBMAILIMPORTER_VERSION_LIB "5.2.80")
137 set(MAILCOMMON_LIB_VERSION_LIB "5.2.80")
138 set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.80")
139 set(MESSAGELIB_LIB_VERSION_LIB "5.2.89")
140 set(LIBKLEO_LIB_VERSION_LIB "5.2.80")
141 set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.2.80")
142 set(PIMCOMMON_LIB_VERSION_LIB "5.2.80")
143 set(LIBKDEPIM_LIB_VERSION_LIB "5.2.80")
144 set(LIBINCIDENCEEDITOR_LIB_VERSION_LIB "5.2.80")
145 set(CALENDARSUPPORT_LIB_VERSION_LIB "5.2.80")
146 set(EVENTVIEW_LIB_VERSION_LIB "5.2.80")
147 set(KDGANTT2_LIB_VERSION_LIB "5.2.80")
148 set(LIBKSIEVE_LIB_VERSION_LIB "5.2.80")
150 find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
151 set(WEBENGINE_TYPE "QtWebEngine")
154 find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
155 find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
156 find_package(KF5NewStuff ${KF5_VERSION} CONFIG REQUIRED)
157 find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
158 find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
159 find_package(KF5NotifyConfig ${KF5_VERSION} CONFIG REQUIRED)
160 find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
161 find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
162 find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
163 find_package(KF5Auth ${KF5_VERSION} CONFIG REQUIRED)
164 find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
165 find_package(Phonon4Qt5 CONFIG REQUIRED)
166 find_package(KF5DNSSD ${KF5_VERSION} CONFIG REQUIRED)
167 find_package(KF5TextEditor ${KF5_VERSION} CONFIG REQUIRED)
168 find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
169 find_package(KF5GlobalAccel ${KF5_VERSION} CONFIG REQUIRED)
170 find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
172 # Find KdepimLibs Package
173 find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
174 find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
175 find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
176 find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
177 find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
178 find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
179 find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
180 find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
181 find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
182 find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
183 find_package(KF5Holidays ${KHOLIDAYS_LIB_VERSION} CONFIG REQUIRED)
184 find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)
185 find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
186 find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
188 find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
190 find_package(KF5Syndication ${SYNDICATION_LIB_VERSION} CONFIG REQUIRED)
191 find_package(KF5Gpgmepp ${GPGMEPP_LIB_VERSION} CONFIG REQUIRED)
192 find_package(KF5KontactInterface ${KONTACTINTERFACE_LIB_VERSION} CONFIG REQUIRED)
193 find_package(KF5AlarmCalendar ${AKONADIKALARM_LIB_VERSION} CONFIG REQUIRED)
194 find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
195 find_package(KF5XmlRpcClient ${XMLRPCCLIENT_LIB_VERSION} CONFIG REQUIRED)
196 find_package(KF5Blog ${KBLOG_LIB_VERSION} CONFIG REQUIRED)
197 find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
200 find_package(KF5Gravatar ${LIBGRAVATAR_VERSION_LIB} CONFIG REQUIRED)
201 find_package(KF5MailImporter ${LIBMAILIMPORTER_VERSION_LIB} CONFIG REQUIRED)
202 find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
203 find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
204 find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
205 find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
206 find_package(KF5GrantleeTheme ${LIBGRANTLEETHEME_LIB_VERSION_LIB} CONFIG REQUIRED)
207 find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
208 find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
209 find_package(KF5IncidenceEditor ${LIBINCIDENCEEDITOR_LIB_VERSION_LIB} CONFIG REQUIRED)
210 find_package(KF5MessageCore ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
211 find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
212 find_package(KF5MessageList ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
213 find_package(KF5TemplateParser ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
214 find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION_LIB} CONFIG REQUIRED)
215 find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION_LIB} CONFIG REQUIRED)
216 find_package(KF5KDGantt2 ${KDGANTT2_LIB_VERSION_LIB} CONFIG REQUIRED)
217 find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
218 find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
219 find_package(KF5KdepimDBusInterfaces ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
220 find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
221 find_package(MailTransportDBusService CONFIG REQUIRED)
228 set(KDEPIM_HAVE_X11 ${X11_FOUND})
231 find_package(KF5GAPI "5.1.40" CONFIG)
233 include_directories(${kdepim_SOURCE_DIR} ${kdepim_BINARY_DIR})
235 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
237 find_package(KF5AkonadiSearch "5.2.41" CONFIG REQUIRED)
238 set_package_properties(KF5AkonadiSearch PROPERTIES DESCRIPTION "The Akonadi Search libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Provides search capabilities in KMail and Akonadi")
240 if(KDEPIM_ENTERPRISE_BUILD)
241 message(STATUS "Enterprise build is enabled.")
244 ############### Desktop vs. Mobile options ##############
246 find_package(Boost 1.34.0)
247 set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries" URL "http://www.boost.org" TYPE REQUIRED PURPOSE "Boost is required for building most KDEPIM applications")
249 add_subdirectory(kmail)
250 add_subdirectory(grantleeeditor)
253 add_subdirectory(korganizer)
254 add_subdirectory(sieveeditor)
255 add_subdirectory(storageservicemanager)
256 add_subdirectory(akregator)
257 add_subdirectory(importwizard)
258 add_subdirectory(kaddressbook)
259 add_subdirectory(mboximporter)
260 add_subdirectory(knotes)
261 add_subdirectory(ktnef)
262 add_subdirectory(pimsettingexporter)
263 add_subdirectory(kalarm)
264 add_subdirectory(blogilo)
267 add_subdirectory(kontact)
269 add_subdirectory(akonadiconsole)
270 add_subdirectory(console)
272 add_subdirectory(accountwizard)
274 # doc must be a subdir of kdepim or packagers will kill us
275 add_subdirectory(doc)
277 feature_summary(WHAT ALL
278 INCLUDE_QUIET_PACKAGES
279 FATAL_ON_MISSING_REQUIRED_PACKAGES