plugins/kpackage: Refactor CMake code a bit

This commit is contained in:
Alexander Lohnau 2023-04-02 18:26:14 +02:00
parent d32f9be5af
commit 38758172f3

View file

@ -1,13 +1,13 @@
# SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de> # SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de>
# SPDX-License-Identifier: BSD-2-Clause # SPDX-License-Identifier: BSD-2-Clause
function(kwin_add_package dir) function(kwin_add_kpackage_structure dir file)
kcoreaddons_add_plugin(kwin_${dir} SOURCES "${dir}/${dir}.cpp" INSTALL_NAMESPACE "kf6/packagestructure") kcoreaddons_add_plugin(kwin_${dir} SOURCES ${file} INSTALL_NAMESPACE kf6/packagestructure)
target_link_libraries(kwin_${dir} KF6::Package) target_link_libraries(kwin_${dir} KF6::Package)
endfunction() endfunction()
kwin_add_package(aurorae) kwin_add_kpackage_structure(aurorae aurorae/aurorae.cpp)
kwin_add_package(decoration) kwin_add_kpackage_structure(decoration decoration/decoration.cpp)
kwin_add_package(effect) kwin_add_kpackage_structure(effect effect/effect.cpp)
kwin_add_package(scripts) kwin_add_kpackage_structure(scripts scripts/scripts.cpp)
kwin_add_package(windowswitcher) kwin_add_kpackage_structure(windowswitcher windowswitcher/windowswitcher.cpp)