mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-26 17:03:08 +00:00
Expand TrayController with daemon health polling every 10 seconds via D-Bus Ping calls to org.kde.GameCenter1, org.kde.ALaKarte.Runner1, and org.kde.ALaKarte.Input1. Add menu actions to toggle console behaviors, notification mirroring, and to restart each daemon via systemctl --user. Add NotificationInhibitor, owned by App, which calls org.freedesktop.Notifications Inhibit/UnInhibit on the session bus whenever the consoleBehaviors config setting changes. The cookie is released on application quit. Add consoleBehaviors and mirrorNotifications properties to Config with KConfig persistence under the [Console] group. Ship org.kde.alakarte.notifyrc defining GameLaunched, GameExited, and LaunchFailed notification events so Plasma attributes them correctly in the notification history. Extend RunnerManagerDaemon::ResolveLaunch with a flatpak runner branch that constructs a flatpak run command, translates environment overrides to --env= arguments, and respects flatpakAppId, flatpakBranch, flatpakArch, and flatpakArgs from the launch spec. Add activate_session, switch_to_vt, and terminate_session actions to the gamecenter KAuth helper and its polkit policy. Each action calls the corresponding method on org.freedesktop.login1 over the system bus. Add CouchSidebar.qml, a horizontal source tab bar shown in couch mode above the library view, exposing the same sourceSelected, settingsRequested, importRequested, and aboutRequested signals as SidebarView. Fix duplicate adaptiveFocusRingWidth property in GameCard.qml.
135 lines
3.9 KiB
CMake
135 lines
3.9 KiB
CMake
# SPDX-License-Identifier: BSD-3-Clause
|
|
# SPDX-FileCopyrightText: 2026 A-La-Karte Contributors
|
|
|
|
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(alakarte VERSION 0.1.1)
|
|
|
|
set(PROJECT_DEP_VERSION "6.0.0")
|
|
set(QT_MIN_VERSION "6.6.0")
|
|
set(KF_MIN_VERSION "6.0.0")
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
include(KDEInstallDirs)
|
|
include(KDECMakeSettings)
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
|
include(KDEClangFormat)
|
|
include(KDEGitCommitHooks)
|
|
include(ECMSetupVersion)
|
|
include(ECMGenerateHeaders)
|
|
include(ECMPoQmTools)
|
|
include(ECMDeprecationSettings)
|
|
include(ECMQmlModule)
|
|
include(ECMAddAppIcon)
|
|
include(CTest)
|
|
include(FeatureSummary)
|
|
|
|
ecm_setup_version(${PROJECT_VERSION}
|
|
VARIABLE_PREFIX ALAKARTE
|
|
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/alakarte-version.h"
|
|
)
|
|
|
|
ecm_set_disabled_deprecation_versions(
|
|
QT 6.7
|
|
KF 6.4
|
|
)
|
|
|
|
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
|
|
Core
|
|
Quick
|
|
QuickControls2
|
|
Gui
|
|
Widgets
|
|
Network
|
|
Concurrent
|
|
DBus
|
|
DBusTools
|
|
Svg
|
|
Sql
|
|
)
|
|
|
|
set(ALAKARTE_SDL3_SOURCE_DIR "" CACHE PATH "Path to an SDL3 source tree to build instead of using the system SDL3 package")
|
|
|
|
if (ALAKARTE_SDL3_SOURCE_DIR)
|
|
if (EXISTS "${ALAKARTE_SDL3_SOURCE_DIR}/CMakeLists.txt")
|
|
set(SDL_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
|
|
set(SDL_DISABLE_INSTALL ON CACHE BOOL "" FORCE)
|
|
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
|
|
set(SDL_STATIC ON CACHE BOOL "" FORCE)
|
|
set(SDL_X11_XSCRNSAVER OFF CACHE BOOL "" FORCE)
|
|
|
|
add_subdirectory("${ALAKARTE_SDL3_SOURCE_DIR}" third_party/SDL-build EXCLUDE_FROM_ALL)
|
|
|
|
# SDL built from source is treated as a third-party dependency. Silence its
|
|
# warnings so they don't drown out warnings from A-La-Karte itself.
|
|
foreach(_alakarte_sdl_target IN ITEMS SDL3-static SDL3-static_a SDL3-shared SDL_uclibc)
|
|
if (TARGET ${_alakarte_sdl_target})
|
|
target_compile_options(${_alakarte_sdl_target} PRIVATE
|
|
$<$<COMPILE_LANG_AND_ID:C,GNU,Clang,AppleClang>:-w>
|
|
$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>:-w>
|
|
$<$<COMPILE_LANG_AND_ID:C,MSVC>:/w>
|
|
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/w>
|
|
)
|
|
endif()
|
|
endforeach()
|
|
else()
|
|
message(FATAL_ERROR "ALAKARTE_SDL3_SOURCE_DIR does not contain a CMakeLists.txt: ${ALAKARTE_SDL3_SOURCE_DIR}")
|
|
endif()
|
|
else()
|
|
find_package(SDL3 REQUIRED)
|
|
endif()
|
|
|
|
if (NOT TARGET SDL3::SDL3)
|
|
if (TARGET SDL3::SDL3-static)
|
|
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
|
|
elseif (TARGET SDL3::SDL3-shared)
|
|
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-shared)
|
|
elseif (TARGET SDL3::SDL3::SDL3)
|
|
add_library(SDL3::SDL3 ALIAS SDL3::SDL3::SDL3)
|
|
else()
|
|
message(FATAL_ERROR "SDL3 was found/built, but no usable CMake target was provided (expected SDL3::SDL3 or a compatible variant)")
|
|
endif()
|
|
endif()
|
|
|
|
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
|
|
Kirigami
|
|
I18n
|
|
CoreAddons
|
|
Config
|
|
Crash
|
|
DBusAddons
|
|
WindowSystem
|
|
)
|
|
|
|
find_package(KF6Auth ${KF_MIN_VERSION} QUIET)
|
|
|
|
find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} QUIET)
|
|
|
|
find_package(KF6KirigamiAddons 1.0.0 REQUIRED)
|
|
|
|
qt_policy(SET QTP0001 NEW)
|
|
|
|
add_subdirectory(src)
|
|
add_subdirectory(src/krunner)
|
|
add_subdirectory(icons)
|
|
|
|
if (BUILD_TESTING)
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|
|
ki18n_install(po)
|
|
|
|
install(FILES org.kde.alakarte.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
|
install(FILES org.kde.alakarte.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
|
|
|
|
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
|
|
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
|
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|