From 38758172f37b2d5b03622022f913810e9b4b259a Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sun, 2 Apr 2023 18:26:14 +0200 Subject: [PATCH] plugins/kpackage: Refactor CMake code a bit --- src/plugins/kpackage/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/kpackage/CMakeLists.txt b/src/plugins/kpackage/CMakeLists.txt index 64389a6c37..0766021382 100644 --- a/src/plugins/kpackage/CMakeLists.txt +++ b/src/plugins/kpackage/CMakeLists.txt @@ -1,13 +1,13 @@ # SPDX-FileCopyrightText: 2023 Alexander Lohnau # SPDX-License-Identifier: BSD-2-Clause -function(kwin_add_package dir) - kcoreaddons_add_plugin(kwin_${dir} SOURCES "${dir}/${dir}.cpp" INSTALL_NAMESPACE "kf6/packagestructure") +function(kwin_add_kpackage_structure dir file) + kcoreaddons_add_plugin(kwin_${dir} SOURCES ${file} INSTALL_NAMESPACE kf6/packagestructure) target_link_libraries(kwin_${dir} KF6::Package) endfunction() -kwin_add_package(aurorae) -kwin_add_package(decoration) -kwin_add_package(effect) -kwin_add_package(scripts) -kwin_add_package(windowswitcher) +kwin_add_kpackage_structure(aurorae aurorae/aurorae.cpp) +kwin_add_kpackage_structure(decoration decoration/decoration.cpp) +kwin_add_kpackage_structure(effect effect/effect.cpp) +kwin_add_kpackage_structure(scripts scripts/scripts.cpp) +kwin_add_kpackage_structure(windowswitcher windowswitcher/windowswitcher.cpp)