| 1 |
# SPDX-License-Identifier: BSD-3-Clause |
| 2 |
# SPDX-FileCopyrightText: 2022 Harald Sitter <[email protected]> |
| 3 |
|
| 4 |
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.gamemode\") |
| 5 |
remove_definitions( |
| 6 |
-DQT_NO_CAST_FROM_ASCII |
| 7 |
-DQT_NO_CAST_TO_ASCII |
| 8 |
) |
| 9 |
|
| 10 |
set(generated_SRCS) |
| 11 |
|
| 12 |
set_source_files_properties( |
| 13 |
com.feralinteractive.GameMode.xml |
| 14 |
PROPERTIES |
| 15 |
NO_NAMESPACE TRUE |
| 16 |
INCLUDE types.h |
| 17 |
) |
| 18 |
set_source_files_properties(com.feralinteractive.GameMode.Game.xml PROPERTIES NO_NAMESPACE TRUE) |
| 19 |
qt_add_dbus_interface(generated_SRCS org.freedesktop.DBus.Properties.xml org.freedesktop.DBus.Properties) |
| 20 |
qt_add_dbus_interface(generated_SRCS com.feralinteractive.GameMode.Game.xml com.feralinteractive.GameMode.Game) |
| 21 |
qt_add_dbus_interface(generated_SRCS com.feralinteractive.GameMode.xml com.feralinteractive.GameMode) |
| 22 |
|
| 23 |
add_library(plasma-gamemode main.cpp gamesmodel.cpp types.cpp ${generated_SRCS}) |
| 24 |
target_link_libraries( |
| 25 |
plasma-gamemode |
| 26 |
Qt6::DBus |
| 27 |
Qt6::Quick |
| 28 |
) |
| 29 |
|
| 30 |
include(KDEInstallDirs6) |
| 31 |
|
| 32 |
set(PRIVATE_QML_INSTALL_DIR ${KDE_INSTALL_FULL_QMLDIR}/org/kde/plasma/private/gamemode) |
| 33 |
install(TARGETS plasma-gamemode DESTINATION ${PRIVATE_QML_INSTALL_DIR}) |
| 34 |
install(FILES qmldir DESTINATION ${PRIVATE_QML_INSTALL_DIR}) |
| 35 |
|
| 36 |
add_subdirectory(applet) |