shift-shell/initialstart/modules/prepare/CMakeLists.txt
Devin Lin c7e5003596 screenbrightnessplugin: Extract from initialstart and use in shell
This is partially an emergency fix also for
https://invent.kde.org/plasma/plasma-mobile/-/issues/404, which was
potentially introduced by https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/582

This MR extracts the screen brightness implementation from initialstart
to a QML plugin, and also ports the action drawer brightness slider
implementation to it. This avoids importing the powerdevil screen
brightness plugin on the lockscreen, which apparently has a race
condition that causes it to sometimes segfault.
2024-10-08 22:47:30 -07:00

34 lines
1 KiB
CMake

# SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
set(prepareplugin_SRCS
prepareplugin.cpp
prepareutil.cpp
)
kconfig_add_kcfg_files(prepareplugin_SRCS colorssettings.kcfgc GENERATE_MOC)
add_library(prepareplugin ${prepareplugin_SRCS})
target_link_libraries(prepareplugin
Qt::Core
Qt::DBus
Qt::Quick
KF6::CoreAddons
KF6::ConfigCore
KF6::ConfigGui
KF6::I18n
KF6::Notifications
KF6::Screen
)
set_property(TARGET prepareplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/org/kde/plasma/mobileinitialstart/prepare)
file(COPY qmldir DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/org/kde/plasma/mobileinitialstart/prepare)
install(TARGETS prepareplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/mobileinitialstart/prepare)
install(FILES qmldir ${qml_SRC} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/mobileinitialstart/prepare)
plasma_install_package(package org.kde.plasma.mobileinitialstart.prepare mobileinitialstart)