CMakeLists.txt 7.59 KB
Newer Older
1
2
cmake_minimum_required(VERSION 3.0)

3
project(plasma-workspace)
4
set(PROJECT_VERSION "5.19.0")
5
set(PROJECT_VERSION_MAJOR 5)
6

7
set(QT_MIN_VERSION "5.14.0")
8
set(KF5_MIN_VERSION "5.70.0")
9
set(INSTALL_SDDM_THEME TRUE)
10
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Widgets Quick QuickWidgets Concurrent Test Network)
11
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
12
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
13

14
15
16
17
18
19
20
21
22
23
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMMarkNonGuiExecutable)
include(CMakePackageConfigHelpers)
include(WriteBasicConfigVersionFile)
include(CheckIncludeFiles)
include(FeatureSummary)
include(ECMOptionalAddSubdirectory)
include(ECMQtDeclareLoggingCategory)
Nate Graham's avatar
Nate Graham committed
24
include(ECMQueryQmake)
25
include(KDEPackageAppTemplates)
26
include(KDEClangFormat)
27

Hrvoje Senjan's avatar
Hrvoje Senjan committed
28
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
29
                    Plasma DocTools Runner Notifications NotifyConfig Su NewStuff Wallet
Bhushan Shah's avatar
Bhushan Shah committed
30
                    IdleTime Declarative I18n KCMUtils TextWidgets KDELibs4Support Crash GlobalAccel
31
                    DBusAddons Wayland CoreAddons People ActivitiesStats KIO)
32
33
find_package(KDED CONFIG REQUIRED)

34
35
36
37
38
find_package(KF5NetworkManagerQt ${KF5_MIN_VERSION})
set_package_properties(KF5NetworkManagerQt PROPERTIES DESCRIPTION "Qt wrapper for NetworkManager API"
                       TYPE OPTIONAL
                       PURPOSE "Needed by geolocation data engine."
                      )
39

40
41
42
43
44
45
find_package(KF5Kirigami2 ${KF5_MIN_VERSION} CONFIG)
set_package_properties(KF5Kirigami2 PROPERTIES
    DESCRIPTION "A QtQuick based components set"
    TYPE RUNTIME
)

46
47
48
49
50
51
find_package(KF5QuickCharts ${KF5_MIN_VERSION} CONFIG)
set_package_properties(KF5QuickCharts PROPERTIES
    DESCRIPTION "Used for rendering charts"
    TYPE RUNTIME
)

Hrvoje Senjan's avatar
Hrvoje Senjan committed
52
# WARNING PlasmaQuick provides unversioned CMake config
53
find_package(KUserFeedback)
Hrvoje Senjan's avatar
Hrvoje Senjan committed
54
find_package(KF5 REQUIRED COMPONENTS PlasmaQuick)
55
find_package(KSysGuard CONFIG REQUIRED)
56
find_package(KF5 REQUIRED COMPONENTS Package)
Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
57
58
59
60
61
62
63

find_package(KF5Baloo)
set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "File Searching"
                       TYPE RECOMMENDED
                       PURPOSE "Needed for the File Search runner."
                      )

64
find_package(KF5TextEditor)
65
find_package(KWinDBusInterface CONFIG REQUIRED)
66

Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
67
find_package(KF5Screen CONFIG REQUIRED)
68
find_package(KScreenLocker 5.13.80 REQUIRED)
69
find_package(ScreenSaverDBusInterface CONFIG REQUIRED)
70
71
72
73
74
find_package(KF5Holidays)
set_package_properties(KF5Holidays PROPERTIES DESCRIPTION "Holidays provider for Plasma calendar"
                       TYPE OPTIONAL
                       PURPOSE "Needed to for holidays plugin for Plasma Calendar."
                      )
75

76
77
78
79
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
set_package_properties(Phonon4Qt5 PROPERTIES
   DESCRIPTION "Qt-based audio library"
   TYPE REQUIRED)
Hrvoje Senjan's avatar
Hrvoje Senjan committed
80
find_package(KF5Activities ${KF5_MIN_VERSION})
81
82
83
84
85
86
87
set_package_properties(KF5Activities PROPERTIES DESCRIPTION "management of Plasma activities"
                       TYPE OPTIONAL
                       PURPOSE "Needed by activity related plasmoids."
                      )

find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams"
88
                       URL "https://www.zlib.net"
89
90
91
92
93
                       TYPE REQUIRED
                      )

find_package(X11)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
94
                        URL "https://www.x.org"
95
96
97
98
                        TYPE OPTIONAL
                        PURPOSE "Required for building the X11 based workspace")

if(X11_FOUND)
99
  find_package(XCB MODULE REQUIRED COMPONENTS XCB RANDR)
100
  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
101
102
103
  if(NOT X11_SM_FOUND)
    message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
  endif(NOT X11_SM_FOUND)
104
105
106
107

  find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS X11Extras)
endif()

Marco Martin's avatar
Marco Martin committed
108
109
110
111
if(X11_FOUND AND XCB_XCB_FOUND)
  set(HAVE_X11 1)
endif()

112
find_package(AppStreamQt 0.10.6)
113
114
115
116
117
set_package_properties(AppStreamQt PROPERTIES DESCRIPTION "Access metadata for listing available software"
                       URL "https://www.freedesktop.org/wiki/Distributions/AppStream/"
		       TYPE OPTIONAL
                      )

118
119
120
if(${AppStreamQt_FOUND})
    set(HAVE_APPSTREAMQT true)
endif()
121

122
123
124
125
126
127
128
include(ConfigureChecks.cmake)

include_directories("${CMAKE_CURRENT_BINARY_DIR}")

configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
configure_file(config-unix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-unix.h )
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
129
configure_file(config-appstream.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-appstream.h )
130
add_subdirectory(login-sessions)
131

132
plasma_install_package(lookandfeel org.kde.breeze.desktop look-and-feel lookandfeel)
133

134
if (INSTALL_SDDM_THEME)
135
136
    configure_file(sddm-theme/theme.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/sddm-theme/theme.conf)

137
138
139
# Install the login theme into the SDDM directory
# Longer term we need to look at making SDDM load from look and feel somehow.. and allow copying at runtime
    #NOTE this trailing slash is important to rename the directory
140
141
142
    install(DIRECTORY sddm-theme/ DESTINATION ${KDE_INSTALL_FULL_DATADIR}/sddm/themes/breeze PATTERN "README.txt" EXCLUDE PATTERN "components" EXCLUDE PATTERN "dummydata" EXCLUDE
    PATTERN "theme.conf.cmake" EXCLUDE)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sddm-theme/theme.conf DESTINATION ${KDE_INSTALL_FULL_DATADIR}/sddm/themes/breeze)
143
    install(DIRECTORY lookandfeel/contents/components DESTINATION ${KDE_INSTALL_FULL_DATADIR}/sddm/themes/breeze PATTERN "README.txt" EXCLUDE)
144

145
146
endif()

147
148
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)

Nate Graham's avatar
Nate Graham committed
149
150
151
# locate qdbus in the Qt path because not every distro makes a symlink at /usr/bin/qdbus
query_qmake(QtBinariesDir QT_INSTALL_BINS)

152
153
add_subdirectory(doc)
add_subdirectory(libkworkspace)
154
add_subdirectory(libdbusmenuqt)
David Edmundson's avatar
David Edmundson committed
155
add_subdirectory(appmenu)
156

Eike Hein's avatar
Eike Hein committed
157
add_subdirectory(libtaskmanager)
158
add_subdirectory(libnotificationmanager)
159
add_subdirectory(libcolorcorrect)
160
add_subdirectory(components)
161

162
add_subdirectory(plasma-windowed)
Marco Martin's avatar
Marco Martin committed
163
add_subdirectory(shell)
164
165
166
167
add_subdirectory(freespacenotifier)
add_subdirectory(klipper)
add_subdirectory(krunner)
add_subdirectory(ksmserver)
168
add_subdirectory(logout-greeter)
169
add_subdirectory(ksplash)
Vishesh Handa's avatar
Vishesh Handa committed
170
add_subdirectory(systemmonitor)
171
172
173
174
add_subdirectory(statusnotifierwatcher)
add_subdirectory(startkde)
add_subdirectory(themes)

Bhushan Shah's avatar
Bhushan Shah committed
175
176
add_subdirectory(kcms)

177
178
179
180
181
182
add_subdirectory(containmentactions)
add_subdirectory(runners)
add_subdirectory(applets)
add_subdirectory(dataengines)
add_subdirectory(wallpapers)

183
184
185
186
add_subdirectory(kioslave)
add_subdirectory(ktimezoned)
add_subdirectory(menu)
add_subdirectory(phonon)
187
188
189
190
191

# This ensures pressing the eject button on a CD drive ejects the disc
# It listens to the Solid::OpticalDrive::ejectPressed signal that is only
# supported by Solid in the HAL backend and does nothing with UDev
if(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
192
add_subdirectory(solidautoeject)
193
endif()
194

David Edmundson's avatar
David Edmundson committed
195
196
ecm_optional_add_subdirectory(xembed-sni-proxy)

Kai Uwe Broulik's avatar
Kai Uwe Broulik committed
197
198
ecm_optional_add_subdirectory(gmenu-dbusmenu-proxy)

199
add_subdirectory(soliduiserver)
200

201
202
203
204
if(KF5Holidays_FOUND)
    add_subdirectory(plasmacalendarintegration)
endif()

205
206
add_subdirectory(templates)

Laurent Montel's avatar
Laurent Montel committed
207
install(FILES plasma-workspace.categories   DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
208
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
209
210
211
212

# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})