shift-shell/components/waydroidintegrationplugin/kauth/CMakeLists.txt
Marco Allegretti 523c3a6728 Support rootless KAuth install for local development
Add PLASMA_MOBILE_LOCAL_KAUTH_INSTALL CMake option to redirect KAuth
helper executables, D-Bus service files, and polkit policy files into
CMAKE_INSTALL_PREFIX instead of hardcoded /usr paths.

Guard KF6Auth find_package calls in helper subdirectories with
if(NOT TARGET KF6::AuthCore) to avoid re-running find_package after
the top-level override, which would revert generated service Exec
paths back to /usr/libexec/kf6/kauth.
2026-04-08 19:06:55 +02:00

28 lines
No EOL
909 B
CMake

# SPDX-FileCopyrightText: 2025 Florian RICHER <florian.richer@protonmail.com>
# SPDX-License-Identifier: BSD-2-Clause
add_executable(waydroidhelper)
target_sources(waydroidhelper PRIVATE waydroidhelper.cpp)
target_link_libraries(waydroidhelper
Qt6::Core
KF6::AuthCore
KF6::CoreAddons
)
install(TARGETS waydroidhelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
if(NOT TARGET KF6::AuthCore)
find_package(KF6Auth NO_MODULE REQUIRED)
endif()
kauth_install_helper_files(waydroidhelper org.kde.plasma.mobileshell.waydroidhelper root)
kauth_install_actions(org.kde.plasma.mobileshell.waydroidhelper waydroidhelper.actions)
ecm_qt_declare_logging_category(waydroidhelper
HEADER waydroidhelper_debug.h
IDENTIFIER WAYDROIDHELPER
DEFAULT_SEVERITY Warning
CATEGORY_NAME org.kde.plasma.mobileshell.waydroidhelper
DESCRIPTION "Helper for Waydroid for some actions need root access"
)