mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
Add the ability to enable/disable the new KWin "gamecontroller" plugin from KWin commit 3110eaef. The new UI element will be added as part of the existing gamecontroller KCM. This plugin provides some integration for game controllers. While no other process is using a given controller device, it translates controller inputs to keyboard and mouse events, to make the device useful for input on the desktop. It also prevents the system from going idle (turning the screen off or going to standby) while any gamepad is used. BUG: 328987
49 lines
1 KiB
CMake
49 lines
1 KiB
CMake
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
add_definitions(-DTRANSLATION_DOMAIN="kcm_gamecontroller")
|
|
|
|
kcmutils_add_qml_kcm(kcm_gamecontroller INSTALL_NAMESPACE "plasma/kcms/systemsettings")
|
|
|
|
ecm_qt_declare_logging_category(kcm_gamecontroller
|
|
HEADER
|
|
logging.h
|
|
IDENTIFIER
|
|
KCM_GAMECONTROLLER
|
|
CATEGORY_NAME
|
|
kcm_gamecontroller
|
|
DEFAULT_SEVERITY
|
|
Critical
|
|
DESCRIPTION
|
|
"KCM for game controller"
|
|
EXPORT
|
|
kcm_gamecontroller
|
|
)
|
|
|
|
ecm_qt_install_logging_categories(
|
|
EXPORT kcm_gamecontroller
|
|
DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
|
|
)
|
|
|
|
target_sources(kcm_gamecontroller PRIVATE
|
|
devicemodel.cpp
|
|
device.cpp
|
|
axesmodel.cpp
|
|
axesproxymodel.cpp
|
|
buttonmodel.cpp
|
|
hatmodel.cpp
|
|
kcm.cpp
|
|
udevmatcher.cpp
|
|
)
|
|
|
|
target_link_libraries(kcm_gamecontroller PRIVATE
|
|
KF6::CoreAddons
|
|
KF6::KCMUtils
|
|
KF6::KCMUtilsQuick
|
|
KF6::I18n
|
|
Qt6::Quick
|
|
Qt6::QuickWidgets
|
|
SDL2::SDL2
|
|
Qt::DBus
|
|
UDev::UDev
|
|
)
|