From a29019631e54b38ceec955fbbbf7388c94e32dc2 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sat, 18 Apr 2026 19:05:11 +0200 Subject: [PATCH] Fix KF6Auth find_package order in kauth helpers find_package(KF6Auth) was placed after target_link_libraries, so KF6::AuthCore could be undefined when the linker target was created. Move it before target_link_libraries in both the flashlight and waydroid helpers. --- components/waydroidintegrationplugin/kauth/CMakeLists.txt | 8 ++++---- quicksettings/flashlight/kauth/CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/waydroidintegrationplugin/kauth/CMakeLists.txt b/components/waydroidintegrationplugin/kauth/CMakeLists.txt index 92214c85..169d6902 100644 --- a/components/waydroidintegrationplugin/kauth/CMakeLists.txt +++ b/components/waydroidintegrationplugin/kauth/CMakeLists.txt @@ -1,6 +1,10 @@ # SPDX-FileCopyrightText: 2025 Florian RICHER # SPDX-License-Identifier: BSD-2-Clause +if(NOT TARGET KF6::AuthCore) + find_package(KF6Auth NO_MODULE REQUIRED) +endif() + add_executable(waydroidhelper) target_sources(waydroidhelper PRIVATE waydroidhelper.cpp) @@ -12,10 +16,6 @@ target_link_libraries(waydroidhelper 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) diff --git a/quicksettings/flashlight/kauth/CMakeLists.txt b/quicksettings/flashlight/kauth/CMakeLists.txt index a16020c8..ba51397c 100644 --- a/quicksettings/flashlight/kauth/CMakeLists.txt +++ b/quicksettings/flashlight/kauth/CMakeLists.txt @@ -4,6 +4,10 @@ add_executable(flashlighthelper) target_sources(flashlighthelper PRIVATE flashlighthelper.cpp) +if(NOT TARGET KF6::AuthCore) + find_package(KF6Auth NO_MODULE REQUIRED) +endif() + target_link_libraries(flashlighthelper Qt6::Core KF6::AuthCore @@ -13,10 +17,6 @@ target_link_libraries(flashlighthelper install(TARGETS flashlighthelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR}) -if(NOT TARGET KF6::AuthCore) - find_package(KF6Auth NO_MODULE REQUIRED) -endif() - kauth_install_helper_files(flashlighthelper org.kde.plasma.mobileshell.flashlighthelper root) kauth_install_actions(org.kde.plasma.mobileshell.flashlighthelper flashlighthelper.actions)