3 include(CheckIncludeFiles)
6 if(${CMAKE_SOURCE_DIR} STREQUAL ${kmail_SOURCE_DIR})
7 cmake_minimum_required(VERSION 3.1)
9 cmake_policy(SET CMP0063 NEW)
11 set(KF5_VERSION "5.23.0")
12 find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
13 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
14 include(ECMOptionalAddSubdirectory)
15 include(ECMInstallIcons)
16 include(ECMSetupVersion)
18 include(ECMMarkNonGuiExecutable)
19 include(GenerateExportHeader)
20 include(ECMGenerateHeaders)
21 include(CMakePackageConfigHelpers)
22 include(FeatureSummary)
23 include(CheckFunctionExists)
24 include(ECMGeneratePriFile)
26 include(KDEInstallDirs)
27 include(KDECMakeSettings)
28 include(KDECompilerSettings NO_POLICY_SCOPE)
29 include(ECMAddAppIcon)
30 include(ECMQtDeclareLoggingCategory)
33 set(KDEPIM_DEV_VERSION beta1)
36 if(DEFINED KDEPIM_DEV_VERSION)
37 set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
40 set(KDEPIM_VERSION_NUMBER "5.2.80")
41 set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
44 set(AKONADI_MIMELIB_VERSION "5.2.80")
45 set(AKONADI_CONTACT_VERSION "5.2.80")
46 set(KCONTACTS_LIB_VERSION "5.2.81")
47 set(KCALENDARCORE_LIB_VERSION "5.2.80")
48 set(CALENDARUTILS_LIB_VERSION "5.2.80")
49 set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.80")
50 set(KLDAP_LIB_VERSION "5.2.80")
51 set(KMAILTRANSPORT_LIB_VERSION "5.2.80")
52 set(GPGMEPP_LIB_VERSION "5.2.80")
53 set(KONTACTINTERFACE_LIB_VERSION "5.2.80")
54 set(KMIME_LIB_VERSION "5.2.80")
55 set(KPIMTEXTEDIT_LIB_VERSION "5.2.80")
56 set(AKONADI_VERSION "5.2.80")
58 set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
59 set(KDEPIM_LIB_SOVERSION "5")
61 set(QT_REQUIRED_VERSION "5.6.0")
62 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)
63 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widgets WebEngine WebEngineWidgets Xml)
64 set(LIBGRAVATAR_VERSION_LIB "5.2.80")
65 set(MAILCOMMON_LIB_VERSION_LIB "5.2.80")
66 set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.80")
67 set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
68 set(LIBKLEO_LIB_VERSION_LIB "5.2.80")
69 set(PIMCOMMON_LIB_VERSION_LIB "5.2.81")
70 set(LIBKDEPIM_LIB_VERSION_LIB "5.2.80")
71 set(LIBKSIEVE_LIB_VERSION_LIB "5.2.82")
73 find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
74 set(WEBENGINE_TYPE "QtWebEngine")
76 find_package(KF5AkonadiSearch "5.2.80" CONFIG REQUIRED)
77 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")
80 find_package(KF5Crash ${KF5_VERSION} REQUIRED)
82 find_package(KF5Bookmarks ${KF5_VERSION} CONFIG REQUIRED)
83 find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
84 find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
85 find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
86 find_package(KF5Crash ${KF5_VERSION} CONFIG REQUIRED)
87 find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
88 find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
89 find_package(KF5GuiAddons ${KF5_VERSION} REQUIRED)
90 find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
91 find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
92 find_package(KF5JobWidgets ${KF5_VERSION} REQUIRED)
93 find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
94 find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
95 find_package(KF5Notifications ${KF5_VERSION} CONFIG REQUIRED)
96 find_package(KF5NotifyConfig ${KF5_VERSION} CONFIG REQUIRED)
97 find_package(KF5Parts ${KF5_VERSION} CONFIG REQUIRED)
98 find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
99 find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
100 find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
101 find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
102 find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
103 find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
105 # Find KdepimLibs Package
106 find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
107 find_package(KF5AkonadiContact ${AKONADI_CONTACT_VERSION} CONFIG REQUIRED)
108 find_package(KF5AkonadiMime ${AKONADI_MIMELIB_VERSION} CONFIG REQUIRED)
109 find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
110 find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
111 find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
112 find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
113 find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
114 find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
115 find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
117 find_package(KF5Gpgmepp ${GPGMEPP_LIB_VERSION} CONFIG REQUIRED)
118 find_package(KF5KontactInterface ${KONTACTINTERFACE_LIB_VERSION} CONFIG REQUIRED)
119 find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
121 find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
122 find_package(KF5Gravatar ${LIBGRAVATAR_VERSION_LIB} CONFIG REQUIRED)
123 find_package(KF5KdepimDBusInterfaces ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
124 find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
125 find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
126 find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
127 find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
128 find_package(KF5MessageCore ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
129 find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
130 find_package(KF5MessageList ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
131 find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
132 find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
133 find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
134 find_package(KF5TemplateParser ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
135 find_package(MailTransportDBusService CONFIG REQUIRED)
137 find_package(Boost 1.34.0)
138 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")
139 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
141 add_definitions(-DQT_USE_QSTRINGBUILDER)
142 configure_file(config-enterprise.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-enterprise.h )
144 include_directories(${kmail_SOURCE_DIR} ${kmail_BINARY_DIR})
145 configure_file(kmail-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kmail-version.h @ONLY)
147 add_definitions( -DQT_NO_CAST_FROM_ASCII )
148 add_definitions( -DQT_NO_CAST_TO_ASCII )
150 add_subdirectory(src)
151 add_subdirectory(agents)
153 install( FILES kmail.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
155 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
156 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)