-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
54 lines (40 loc) · 1.28 KB
/
Copy pathCMakeLists.txt
File metadata and controls
54 lines (40 loc) · 1.28 KB
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
cmake_minimum_required(VERSION 3.16)
project(plasma-kraidmonitor)
# Make sure we're using Qt6
set(QT_MAJOR_VERSION 6)
set(QT_MIN_VERSION "6.5.0")
find_package(ECM 1.4.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
# Find Qt6 packages first
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
Core
Qml
)
# Then find Plasma
find_package(Plasma REQUIRED)
# Find KF6
find_package(KF6 REQUIRED COMPONENTS
I18n
)
set(kraidmonitor_SRCS
plugin/kraidmonitor.cpp
)
add_library(kraidmonitorplugin SHARED ${kraidmonitor_SRCS})
target_link_libraries(kraidmonitorplugin
Qt6::Core
Qt6::Qml
KF6::I18n
)
install(TARGETS kraidmonitorplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/kraidmonitor)
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/kraidmonitor)
plasma_install_package(package org.kde.plasma.kraidmonitor)
# Install icons
install(FILES package/contents/icons/raidgreen.svg
package/contents/icons/raidred.svg
package/contents/icons/raidyellow.svg
DESTINATION ${KDE_INSTALL_DATADIR}/plasma/plasmoids/org.kde.plasma.kraidmonitor/contents/icons)
# Translations
ki18n_install(po)