This repository was archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
153 lines (129 loc) · 4.44 KB
/
CMakeLists.txt
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
project(nxmenu)
set(PROJECT_VERSION "1.0")
set(PROJECT_VERSION_MAJOR 1)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.4.0")
find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(ECMOptionalAddSubdirectory)
include(FeatureSummary)
include(CheckIncludeFiles)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Quick
QuickWidgets
DBus
Widgets
X11Extras
)
set(KF5_MIN_VERSION "5.24.0")
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Plasma
PlasmaQuick
I18n
Notifications
Runner
Declarative
Solid
WindowSystem
DBusAddons
People
KIO
Activities
KDELibs4Support
)
find_package(LibKWorkspace CONFIG REQUIRED)
find_package(KSMServerDBusInterface CONFIG REQUIRED)
find_package(PackageKitQt5 0.9)
set_package_properties(PackageKitQt5 PROPERTIES DESCRIPTION "Software Manager integration"
TYPE OPTIONAL
PURPOSE "Provides package management integration to the application launcher."
)
find_package(KF5Activities ${KF5_VERSION})
set_package_properties(KF5Activities PROPERTIES DESCRIPTION "management of Plasma activities"
PURPOSE "Needed by activity related plasmoids and the pager."
)
find_package(X11)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
URL "http://www.x.org"
TYPE REQUIRED
PURPOSE "Required for building the X11 based workspace"
)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
add_definitions(
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
# -DQT_NO_CAST_FROM_ASCII
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_USE_FAST_OPERATOR_PLUS
-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.nxmenu\"
)
plasma_install_package(package org.kde.plasma.nxmenu)
include_directories(plugin/plasmaquick)
set(nxmenuplugin_SRCS
plugin/abstractentry.cpp
plugin/abstractmodel.cpp
plugin/actionlist.cpp
plugin/appentry.cpp
plugin/appsmodel.cpp
plugin/contactentry.cpp
plugin/containmentinterface.cpp
plugin/draghelper.cpp
plugin/favoritesmodel.cpp
plugin/fileentry.cpp
plugin/simplemenuplugin.cpp
plugin/menuentryeditor.cpp
plugin/processrunner.cpp
plugin/rootmodel.cpp
plugin/runnermodel.cpp
plugin/runnermatchesmodel.cpp
plugin/simplemenudialog.cpp
plugin/systementry.cpp
plugin/systemmodel.cpp
plugin/systemsettings.cpp
plugin/wheelinterceptor.cpp
plugin/windowsystem.cpp
plugin/groupsmodel.cpp
)
if(PackageKitQt5_FOUND)
list(APPEND nxmenuplugin_SRCS plugin/findpackagenamejob.cpp)
endif()
qt5_add_dbus_interface(nxmenuplugin_SRCS ${KSMSERVER_DBUS_INTERFACE} ksmserver_interface)
install(FILES plugin/qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/nxmenu)
add_library(nxmenuplugin SHARED ${nxmenuplugin_SRCS})
target_link_libraries(nxmenuplugin
Qt5::Core
Qt5::DBus
Qt5::Qml
Qt5::Quick
Qt5::X11Extras
KF5::Activities
KF5::ConfigCore
KF5::CoreAddons
KF5::I18n
KF5::KDELibs4Support # FIXME: New Solid power management API doesn't exist yet, so we need to use deprecated stuff.
KF5::KIOCore
KF5::KIOWidgets
KF5::People
KF5::PeopleWidgets
KF5::PlasmaQuick
KF5::Runner
KF5::Service
KF5::Solid
KF5::WindowSystem
PW::KWorkspace)
if(PackageKitQt5_FOUND)
target_link_libraries(nxmenuplugin PK::packagekitqt5)
endif()
install(TARGETS nxmenuplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/nxmenu)
file(GLOB_RECURSE QML_SRCS package/*)
add_custom_target(PackageFiles ALL echo SOURCES ${QML_SRCS} ${JS_SRCS})