summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <sknauss@kde.org>2016-11-07 13:03:03 (GMT)
committerSandro Knauß <sknauss@kde.org>2016-11-07 20:38:03 (GMT)
commitf1cc2c8c75b6bd452027a34c8c92ec61bd6a5a48 (patch)
tree1a13491bc5df49c013a66fbbbd95d089b7d8c0e8
parent5e197abb437fdfae66c80e6a1377c70589ddc68d (diff)
Add option to only build mimetreeparser
we need this to have a cleanbuild for kube Differential Revision: https://phabricator.kde.org/D3230
-rw-r--r--CMakeLists.txt113
1 files changed, 61 insertions, 52 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 897b64d..0175106 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.8.12)
project(Messagelib)
+option(MIMETREEPARSER_ONLY_BUILD "Build only mimetreeparser" FALSE)
+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(KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT "Enable this feature if you want to use new kf5 syntax highlighting module." TRUE)
+
set(KF5_VERSION "5.28.0")
find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${Messagelib_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
@@ -41,57 +45,60 @@ set(LIBKDEPIM_LIB_VERSION "5.3.42")
set(LIBKLEO_LIB_VERSION "5.3.46")
set(PIMCOMMON_LIB_VERSION "5.3.61")
-find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network PrintSupport WebEngine WebEngineWidgets WebKitWidgets)
+find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui Test)
-find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5JobWidgets ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
-find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
-
-find_package(Grantlee5 "5.1" CONFIG REQUIRED)
-
-find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
-find_package(KF5AkonadiMime ${AKONADIMIME_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5Gravatar ${GRAVATAR_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5AkonadiSearch "5.3.40" CONFIG REQUIRED)
-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")
-
-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(KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT "Enable this feature if you want to use new kf5 syntax highlighting module." TRUE)
-
-if (KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT)
- find_package(KF5SyntaxHighlighting ${KF5_VERSION})
- if (KF5SyntaxHighlighting_FOUND)
- MESSAGE(STATUS "found KF5SyntaxHighlighting")
- set(KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT true)
+if (NOT ${MIMETREEPARSER_ONLY_BUILD})
+ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Network PrintSupport WebEngine WebEngineWidgets WebKitWidgets)
+
+ find_package(KF5Archive ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5JobWidgets ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Service ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Sonnet ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
+
+ find_package(Grantlee5 "5.1" CONFIG REQUIRED)
+
+ find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
+ find_package(KF5AkonadiMime ${AKONADIMIME_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5AkonadiNotes ${AKONADINOTES_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5FollowupReminder ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Gravatar ${GRAVATAR_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5KaddressbookGrantlee ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5SendLater ${KDEPIM_APPS_LIB_VERSION} CONFIG REQUIRED)
+
+ find_package(KF5AkonadiSearch "5.3.40" CONFIG REQUIRED)
+ 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")
+
+
+ if (KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT)
+ find_package(KF5SyntaxHighlighting ${KF5_VERSION})
+ if (KF5SyntaxHighlighting_FOUND)
+ MESSAGE(STATUS "found KF5SyntaxHighlighting")
+ set(KDEPIM_KF5SYNTAXHIGHLIGHTING_SUPPORT true)
+ endif()
endif()
endif()
@@ -110,17 +117,19 @@ if(EXISTS "${Messagelib_SOURCE_DIR}/.git")
OUTPUT_VARIABLE messagelib_git_last_change)
string(REGEX REPLACE " [-0-9:+ ]*\n" "" messagelib_git_last_change "${messagelib_git_last_change}")
endif()
-endif()
+endif (NOT ${MIMETREEPARSER_ONLY_BUILD})
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_subdirectory(mimetreeparser)
-add_subdirectory(messageviewer)
-add_subdirectory(templateparser)
-add_subdirectory(messagecomposer)
-add_subdirectory(messagecore)
-add_subdirectory(messagelist)
-add_subdirectory(webengineviewer)
+if (NOT ${MIMETREEPARSER_ONLY_BUILD})
+ add_subdirectory(messageviewer)
+ add_subdirectory(templateparser)
+ add_subdirectory(messagecomposer)
+ add_subdirectory(messagecore)
+ add_subdirectory(messagelist)
+ add_subdirectory(webengineviewer)
+endif()
install( FILES messagelib.renamecategories messagelib.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)