shift-shell/components/screenbrightnessplugin/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

25 lines
670 B
CMake

# SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
ecm_add_qml_module(screenbrightnessplugin URI org.kde.plasma.private.mobileshell.screenbrightnessplugin GENERATE_PLUGIN_SOURCE)
qt_add_dbus_interfaces(DBUS_SRCS dbus/org.kde.Solid.PowerManagement.Actions.BrightnessControl.xml)
target_sources(screenbrightnessplugin PRIVATE
screenbrightnessutil.cpp
${DBUS_SRCS}
)
target_link_libraries(screenbrightnessplugin PRIVATE
Qt::Qml
Qt::DBus
Qt::Gui
Qt::Quick
KF6::CoreAddons
KF6::ConfigCore
KF6::ConfigGui
KF6::I18n
KF6::Screen
)
ecm_finalize_qml_module(screenbrightnessplugin)