File: CMakeLists.txt

package info (click to toggle)
kf5-messagelib 4:18.08.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 66,672 kB
  • sloc: cpp: 84,452; xml: 302; sh: 25; makefile: 13
file content (153 lines) | stat: -rw-r--r-- 6,406 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.9.3")

if (POLICY CMP0053)
    cmake_policy(SET CMP0053 NEW)
endif()

project(Messagelib VERSION ${PIM_VERSION})

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)


set(KF5_VERSION "5.47.0")


set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.9.3")

set(QT_REQUIRED_VERSION "5.9.0")

set(AKONADI_VERSION "5.9.3")
set(GRANTLEETHEME_LIB_VERSION "5.9.3")
set(GRAVATAR_LIB_VERSION "5.9.3")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.9.3")
set(KCONTACTS_LIB_VERSION "5.9.3")
set(KDEPIM_APPS_LIB_VERSION "5.9.3")
set(KLDAP_LIB_VERSION "5.9.3")
set(KMAILTRANSPORT_LIB_VERSION "5.9.3")
set(KMBOX_LIB_VERSION "5.9.3")
set(KMIME_LIB_VERSION "5.9.3")
set(KPIMTEXTEDIT_LIB_VERSION "5.9.3")
set(LIBKDEPIM_LIB_VERSION "5.9.3")
set(LIBKLEO_LIB_VERSION "5.9.3")
set(PIMCOMMON_LIB_VERSION "5.9.3")
set(GPGME_LIB_VERSION "1.8.0")
set(AKONADI_CONTACT_VERSION "5.9.3")

if (${MIMETREEPARSER_ONLY_BUILD})
   set(ECM_VERSION "5.26.0")
   set(KMIME_LIB_VERSION "5.1.40")
else()
    set(ECM_VERSION ${KF5_VERSION})
endif()

find_package(ECM ${ECM_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${Messagelib_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(CMakePackageConfigHelpers)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
include(ECMCoverageOption)


find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui Test)

find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
find_package(QGpgme ${GPGME_LIB_VERSION} CONFIG REQUIRED)

if (NOT ${MIMETREEPARSER_ONLY_BUILD})
   find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Network PrintSupport WebEngine WebEngineWidgets)
   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(KF5SyntaxHighlighting ${KF5_VERSION} CONFIG REQUIRED)
   find_package(KF5DBusAddons ${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(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
   find_package(KF5AkonadiContact ${AKONADI_CONTACT_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(KF5LibkdepimAkonadi ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
   find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
   find_package(KF5MailTransportAkonadi ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
   find_package(KF5Mbox ${KMBOX_LIB_VERSION} CONFIG REQUIRED)
   find_package(KF5PimCommonAkonadi ${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.9.3" 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")

endif()

# Support for the GIT revision number in messagecomposer-version.h
if(EXISTS "${Messagelib_SOURCE_DIR}/.git")
  find_package(Git)
  if(GIT_FOUND)
    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
                    WORKING_DIRECTORY ${Messagelib_SOURCE_DIR}
                    OUTPUT_VARIABLE messagelib_git_revision)
    string(REGEX REPLACE "\n" "" messagelib_git_revision "${messagelib_git_revision}")
    set(messagelib_git_revision "git-${messagelib_git_revision}")

    execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --oneline --format=%ci
                    WORKING_DIRECTORY ${Messagelib_SOURCE_DIR}
                    OUTPUT_VARIABLE messagelib_git_last_change)
    string(REGEX REPLACE " [-0-9:+ ]*\n" "" messagelib_git_last_change "${messagelib_git_last_change}")
  endif()
endif ()

add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x000000)

if(BUILD_TESTING)
   add_definitions(-DBUILD_TESTING)
endif()

add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_subdirectory(mimetreeparser)
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)
ki18n_install(po)

include(/usr/share/pkg-kde-tools/cmake/DebianABIManager.cmake)