Fix url
[kdepim.git] / CMakeLists.txt
blobbdb68141714e5112bc0569d3c248e1f85152b464
1 project(kdepim)
3 cmake_minimum_required(VERSION 3.1)
4 option(KDEPIM_SUPERBUILD "Build standalone apps (experimental not used for distro)" FALSE)
6 if (KDEPIM_SUPERBUILD)
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)
14     sb_add_project(kmail)
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)
26     sb_add_project(ktnef)
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)
41     sb_end()
43 else()
46     if (POLICY CMP0063)
47         cmake_policy(SET CMP0063 NEW)
48     endif()
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)
60     include(ECMAddTests)
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)
75     # KDEPIM_VERSION
76     # Version scheme: "x.y.z build".
77     #
78     # x is the version number.
79     # y is the major release number.
80     # z is the minor release number.
81     #
82     # "x.y.z" follow the kdelibs version kdepim is released with.
83     #
84     # If "z" is 0, the version is "x.y"
85     #
86     # KDEPIM_DEV_VERSION is empty for final versions.
87     # For development versions "build" is something like "pre", "alpha1", "alpha2", "beta1", "beta2", "rc1", "rc2".
88     #
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
92     # Do NOT add quote
93     set(KDEPIM_DEV_VERSION)
95     # add an extra space
96     if(DEFINED KDEPIM_DEV_VERSION)
97         set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
98     endif()
100     set(KDEPIM_VERSION_NUMBER "5.3.0")
101     set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
104     set(AKONADI_MIMELIB_VERSION "5.3.0")
105     set(AKONADI_CONTACT_VERSION "5.3.0")
106     set(KCONTACTS_LIB_VERSION "5.3.0")
107     set(KCALENDARCORE_LIB_VERSION "5.3.0")
108     set(IDENTITYMANAGEMENT_LIB_VERSION "5.3.0")
109     set(KLDAP_LIB_VERSION "5.3.0")
110     set(KMAILTRANSPORT_LIB_VERSION "5.3.0")
111     set(CALENDARUTILS_LIB_VERSION "5.3.0")
112     set(KHOLIDAYS_LIB_VERSION "5.3.0")
113     set(KTNEF_LIB_VERSION "5.3.0")
114     set(KIMAP_LIB_VERSION "5.3.0")
115     set(KMBOX_LIB_VERSION "5.3.0")
116     set(AKONADICALENDAR_LIB_VERSION "5.3.0")
117     set(SYNDICATION_LIB_VERSION "5.3.0")
118     set(GPGMEPP_LIB_VERSION "5.3.0")
119     set(KONTACTINTERFACE_LIB_VERSION "5.3.0")
120     set(AKONADIKALARM_LIB_VERSION "5.3.0")
121     set(KMIME_LIB_VERSION "5.3.0")
122     set(XMLRPCCLIENT_LIB_VERSION "5.3.0")
123     set(KBLOG_LIB_VERSION "5.3.0")
124     set(KPIMTEXTEDIT_LIB_VERSION "5.3.0")
125     set(AKONADI_VERSION "5.3.0")
127     set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
128     set(KDEPIM_LIB_SOVERSION "5")
129     set(AKONADINOTES_LIB_VERSION "5.3.0")
131     set(QT_REQUIRED_VERSION "5.6.0")
132     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)
133     find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Sql Concurrent UiTools WebEngine WebEngineWidgets)
134     find_package(Qt5X11Extras NO_MODULE)
135     find_package(Grantlee5 "5.1" CONFIG REQUIRED)
136     set(LIBGRAVATAR_VERSION_LIB "5.3.0")
137     set(LIBMAILIMPORTER_VERSION_LIB "5.3.0")
138     set(MAILCOMMON_LIB_VERSION_LIB "5.3.0")
139     set(KDEPIM_APPS_LIB_VERSION_LIB "5.3.0")
140     set(MESSAGELIB_LIB_VERSION_LIB "5.3.0")
141     set(LIBKLEO_LIB_VERSION_LIB "5.3.0")
142     set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.3.0")
143     set(PIMCOMMON_LIB_VERSION_LIB "5.3.0")
144     set(LIBKDEPIM_LIB_VERSION_LIB "5.3.0")
145     set(LIBINCIDENCEEDITOR_LIB_VERSION_LIB "5.3.0")
146     set(CALENDARSUPPORT_LIB_VERSION_LIB "5.3.0")
147     set(EVENTVIEW_LIB_VERSION_LIB "5.3.0")
148     set(KDGANTT2_LIB_VERSION_LIB "5.3.0")
149     set(LIBKSIEVE_LIB_VERSION_LIB "5.3.0")
151     find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
152     set(WEBENGINE_TYPE "QtWebEngine")
154     # Find KF5 package
155     find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
156     find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
157     find_package(KF5NewStuff ${KF5_VERSION} CONFIG REQUIRED)
158     find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
159     find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
160     find_package(KF5NotifyConfig ${KF5_VERSION} CONFIG REQUIRED)
161     find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
162     find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
163     find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
164     find_package(KF5Auth ${KF5_VERSION} CONFIG REQUIRED)
165     find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
166     find_package(Phonon4Qt5 CONFIG REQUIRED)
167     find_package(KF5DNSSD ${KF5_VERSION} CONFIG REQUIRED)
168     find_package(KF5TextEditor ${KF5_VERSION} CONFIG REQUIRED)
169     find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
170     find_package(KF5GlobalAccel ${KF5_VERSION} CONFIG REQUIRED)
171     find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
172     find_package(KF5Crash ${KF5_VERSION} REQUIRED)
174     # Find KdepimLibs Package
175     find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
176     find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
177     find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
178     find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
179     find_package(KF5AkonadiContact ${AKONADI_CONTACT_VERSION} CONFIG REQUIRED)
180     find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
181     find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
182     find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
183     find_package(KF5AkonadiMime ${AKONADI_MIMELIB_VERSION} CONFIG REQUIRED)
184     find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
185     find_package(KF5Holidays ${KHOLIDAYS_LIB_VERSION} CONFIG REQUIRED)
186     find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)
187     find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
188     find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
190     find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
192     find_package(KF5Syndication ${SYNDICATION_LIB_VERSION} CONFIG REQUIRED)
193     find_package(KF5Gpgmepp ${GPGMEPP_LIB_VERSION} CONFIG REQUIRED)
194     find_package(KF5KontactInterface ${KONTACTINTERFACE_LIB_VERSION} CONFIG REQUIRED)
195     find_package(KF5AlarmCalendar ${AKONADIKALARM_LIB_VERSION} CONFIG REQUIRED)
196     find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
197     find_package(KF5XmlRpcClient ${XMLRPCCLIENT_LIB_VERSION} CONFIG REQUIRED)
198     find_package(KF5Blog ${KBLOG_LIB_VERSION} CONFIG REQUIRED)
199     find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
202     find_package(KF5Gravatar ${LIBGRAVATAR_VERSION_LIB} CONFIG REQUIRED)
203     find_package(KF5MailImporter ${LIBMAILIMPORTER_VERSION_LIB} CONFIG REQUIRED)
204     find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
205     find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
206     find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
207     find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
208     find_package(KF5GrantleeTheme ${LIBGRANTLEETHEME_LIB_VERSION_LIB} CONFIG REQUIRED)
209     find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
210     find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
211     find_package(KF5IncidenceEditor ${LIBINCIDENCEEDITOR_LIB_VERSION_LIB} CONFIG REQUIRED)
212     find_package(KF5MessageCore ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
213     find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
214     find_package(KF5MessageList ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
215     find_package(KF5TemplateParser ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
216     find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION_LIB} CONFIG REQUIRED)
217     find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION_LIB} CONFIG REQUIRED)
218     find_package(KF5KDGantt2 ${KDGANTT2_LIB_VERSION_LIB} CONFIG REQUIRED)
219     find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
220     find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
221     find_package(KF5KdepimDBusInterfaces ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
222     find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
223     find_package(MailTransportDBusService CONFIG REQUIRED)
226     if (NOT APPLE)
227         find_package(X11)
228     endif()
230     set(KDEPIM_HAVE_X11 ${X11_FOUND})
232     # Extra package
233     find_package(KF5GAPI "5.3.0" CONFIG)
235     include_directories(${kdepim_SOURCE_DIR} ${kdepim_BINARY_DIR})
237     add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
239     find_package(KF5AkonadiSearch "5.3.0" CONFIG REQUIRED)
240     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")
242     if(KDEPIM_ENTERPRISE_BUILD)
243         message(STATUS "Enterprise build is enabled.")
244     endif()
246     ############### Desktop vs. Mobile options ##############
248     find_package(Boost 1.34.0)
249     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")
251     add_subdirectory(kmail)
252     add_subdirectory(grantleeeditor)
255     add_subdirectory(korganizer)
256     add_subdirectory(sieveeditor)
257     add_subdirectory(storageservicemanager)
258     add_subdirectory(akregator)
259     add_subdirectory(importwizard)
260     add_subdirectory(kaddressbook)
261     add_subdirectory(mboximporter)
262     add_subdirectory(knotes)
263     add_subdirectory(ktnef)
264     add_subdirectory(pimsettingexporter)
265     add_subdirectory(kalarm)
266     add_subdirectory(blogilo)
269     add_subdirectory(kontact)
271     add_subdirectory(akonadiconsole)
272     add_subdirectory(console)
274     add_subdirectory(accountwizard)
276     # doc must be a subdir of kdepim or packagers will kill us
277     add_subdirectory(doc)
279     feature_summary(WHAT ALL
280         INCLUDE_QUIET_PACKAGES
281         FATAL_ON_MISSING_REQUIRED_PACKAGES
282         )
283 endif()