Commit 70368d1f authored by Laurent Montel's avatar Laurent Montel 😁

Look at to split it

parent 3434238a
......@@ -2,12 +2,180 @@ project(kmail)
include(CheckIncludeFiles)
if(${CMAKE_SOURCE_DIR} STREQUAL ${kmail_SOURCE_DIR})
cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 5.20.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${kmail_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMAddTests)
include(ECMMarkNonGuiExecutable)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(CMakePackageConfigHelpers)
include(FeatureSummary)
include(CheckFunctionExists)
include(ECMGeneratePriFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
# Do NOT add quote
set(KDEPIM_DEV_VERSION pre)
# add an extra space
if(DEFINED KDEPIM_DEV_VERSION)
set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
endif()
set(KDEPIM_VERSION_NUMBER "5.2.42")
set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
set(KDEPIMLIBS_LIB_VERSION "5.2.40")
set(KCONTACTS_LIB_VERSION "5.2.40")
set(KCALENDARCORE_LIB_VERSION "5.2.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.40")
set(KLDAP_LIB_VERSION "5.2.40")
set(KMAILTRANSPORT_LIB_VERSION "5.2.40")
set(CALENDARUTILS_LIB_VERSION "5.2.40")
set(KHOLIDAYS_LIB_VERSION "5.2.40")
set(KTNEF_LIB_VERSION "5.2.40")
set(KIMAP_LIB_VERSION "5.2.40")
set(KMBOX_LIB_VERSION "5.2.40")
set(AKONADICALENDAR_LIB_VERSION "5.2.40")
set(SYNDICATION_LIB_VERSION "5.2.40")
set(GPGMEPP_LIB_VERSION "5.2.40")
set(KONTACTINTERFACE_LIB_VERSION "5.2.40")
set(AKONADIKALARM_LIB_VERSION "5.2.40")
set(KMIME_LIB_VERSION "5.2.40")
set(XMLRPCCLIENT_LIB_VERSION "5.2.40")
set(KBLOG_LIB_VERSION "5.2.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.2.40")
set(AKONADI_VERSION "5.2.40")
set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
set(KDEPIM_LIB_SOVERSION "5")
set(AKONADINOTES_LIB_VERSION "5.2.40")
set(QT_REQUIRED_VERSION "5.6.0")
set(KF5_VERSION "5.20.0")
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)
option(QTWEBENGINE_SUPPORT_OPTION "Enable support for QtWebEngine. False by default." FALSE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Sql Concurrent UiTools OpenGL)
find_package(Qt5X11Extras NO_MODULE)
find_package(Grantlee5 "5.0" CONFIG REQUIRED)
set(LIBGRAVATAR_VERSION_LIB "5.2.40")
set(LIBMAILIMPORTER_VERSION_LIB "5.2.40")
set(MAILCOMMON_LIB_VERSION_LIB "5.2.40")
set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.42")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.56")
set(LIBKLEO_LIB_VERSION_LIB "5.2.40")
set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.2.40")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.40")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.40")
set(LIBINCIDENCEEDITOR_LIB_VERSION_LIB "5.2.40")
set(CALENDARSUPPORT_LIB_VERSION_LIB "5.2.40")
set(EVENTVIEW_LIB_VERSION_LIB "5.2.40")
set(KDGANTT2_LIB_VERSION_LIB "5.2.40")
set(LIBKSIEVE_LIB_VERSION_LIB "5.2.40")
if (QTWEBENGINE_SUPPORT_OPTION)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED WebEngine WebEngineWidgets)
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
set(WEBENGINE_TYPE "QtWebEngine")
else()
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED WebKitWidgets)
find_package(KF5WebKit ${KF5_VERSION} CONFIG REQUIRED)
set(WEBENGINE_TYPE "QtWebKit")
endif()
# Find KF5 package
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5NewStuff ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5NotifyConfig ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Auth ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DocTools REQUIRED)
find_package(Phonon4Qt5 CONFIG REQUIRED)
find_package(KF5DNSSD ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5TextEditor ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5GlobalAccel ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
# Find KdepimLibs Package
find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KHOLIDAYS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Syndication ${SYNDICATION_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Gpgmepp ${GPGMEPP_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5KontactInterface ${KONTACTINTERFACE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AlarmCalendar ${AKONADIKALARM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5XmlRpcClient ${XMLRPCCLIENT_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Blog ${KBLOG_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Gravatar ${LIBGRAVATAR_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MailImporter ${LIBMAILIMPORTER_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5GrantleeTheme ${LIBGRANTLEETHEME_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5IncidenceEditor ${LIBINCIDENCEEDITOR_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageCore ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageList ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5TemplateParser ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5EventViews ${EVENTVIEW_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5KDGantt2 ${KDGANTT2_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5ComposerEditorNG ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5KdepimDBusInterfaces ${KDEPIM_APPS_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(MailTransportDBusService CONFIG REQUIRED)
include_directories(${kmail_SOURCE_DIR} ${kmail_BINARY_DIR})
endif()
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
add_subdirectory(src)
add_subdirectory(agents)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
......@@ -4,8 +4,8 @@ qt5_generate_dbus_interface(kmkernel.h org.kde.kmail.kmail.xml OPTIONS -a)
qt5_generate_dbus_interface(editor/kmcomposerwin.h org.kde.kmail.mailcomposer.xml OPTIONS -a)
add_custom_target(kmail_xml ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kmail.kmail.xml
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kmail.mailcomposer.xml
DEPENDS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml
DEPENDS ${kmail_BINARY_DIR}/src/org.kde.kmail.mailcomposer.xml
COMMENT "Helper target for XML stuff. The Kontact plugin, KOrganizer and others depend on it."
)
......@@ -211,11 +211,11 @@ set(kmailprivate_LIB_SRCS
qt5_generate_dbus_interface(editor/kmcomposerwin.h org.kde.kmail.mailcomposer.xml OPTIONS -a)
qt5_add_dbus_adaptor(kmailprivate_LIB_SRCS
${CMAKE_BINARY_DIR}/kmail/src/org.kde.kmail.mailcomposer.xml editor/kmcomposerwin.h KMComposerWin
${kmail_BINARY_DIR}/src/org.kde.kmail.mailcomposer.xml editor/kmcomposerwin.h KMComposerWin
)
qt5_add_dbus_adaptor(kmailprivate_LIB_SRCS
${CMAKE_BINARY_DIR}/kmail/src/org.kde.kmail.kmail.xml kmkernel.h KMKernel
${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml kmkernel.h KMKernel
)
qt5_add_dbus_adaptor(kmailprivate_LIB_SRCS
${MAILTRANSPORT_DBUS_SERVICE} mailserviceimpl.h
......@@ -223,7 +223,7 @@ qt5_add_dbus_adaptor(kmailprivate_LIB_SRCS
)
qt5_add_dbus_interfaces(kmailprivate_LIB_SRCS
${CMAKE_BINARY_DIR}/kmail/src/org.kde.kmail.kmail.xml
${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml
)
qt5_add_dbus_interfaces(kmailprivate_LIB_SRCS
../agents/archivemailagent/org.freedesktop.Akonadi.ArchiveMailAgent.xml
......
......@@ -11,7 +11,7 @@ set(kontact_kmail_plugins_interface_common_SRCS)
ecm_qt_declare_logging_category(kontact_kmail_plugins_interface_common_SRCS HEADER kmailplugin_debug.h IDENTIFIER KMAILPLUGIN_LOG CATEGORY_NAME log_kmail_plugin)
set(kontact_kmail_plugins_interface_SRCS ${interface_SRCS})
qt5_add_dbus_interfaces(kontact_kmail_plugins_interface_SRCS ${CMAKE_BINARY_DIR}/kmail/src/org.kde.kmail.kmail.xml)
qt5_add_dbus_interfaces(kontact_kmail_plugins_interface_SRCS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml)
set(kontact_kmailplugin_PART_SRCS kmail_plugin.cpp summarywidget.cpp ${kontact_kmail_plugins_interface_SRCS} ${kontact_kmail_plugins_interface_common_SRCS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment