plugins/kpackage: Simplify CMake code

Just a simple wrapper that creates the plugin and links KPackage
This commit is contained in:
Alexander Lohnau 2023-04-02 08:02:43 +02:00
parent f88b80e90e
commit 3c2ac3c901
6 changed files with 13 additions and 25 deletions

View file

@ -1,5 +1,13 @@
add_subdirectory(aurorae)
add_subdirectory(decoration)
add_subdirectory(effect)
add_subdirectory(scripts)
add_subdirectory(windowswitcher)
# SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de>
# SPDX-License-Identifier: BSD-2-Clause
function(kwin_add_package dir)
kcoreaddons_add_plugin(kwin_${dir} SOURCES "${dir}/${dir}.cpp" 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)

View file

@ -1,4 +0,0 @@
kcoreaddons_add_plugin(kwin_packagestructure_aurorae SOURCES aurorae.cpp INSTALL_NAMESPACE "kf6/packagestructure")
target_link_libraries(kwin_packagestructure_aurorae KF6::Package)
set_target_properties(kwin_packagestructure_aurorae PROPERTIES OUTPUT_NAME kwin_aurorae)

View file

@ -1,4 +0,0 @@
kcoreaddons_add_plugin(kwin_packagestructure_decoration SOURCES decoration.cpp INSTALL_NAMESPACE "kf6/packagestructure")
target_link_libraries(kwin_packagestructure_decoration KF6::Package)
set_target_properties(kwin_packagestructure_decoration PROPERTIES OUTPUT_NAME kwin_decoration)

View file

@ -1,4 +0,0 @@
kcoreaddons_add_plugin(kwin_packagestructure_effect SOURCES effect.cpp INSTALL_NAMESPACE "kf6/packagestructure")
target_link_libraries(kwin_packagestructure_effect KF6::Package)
set_target_properties(kwin_packagestructure_effect PROPERTIES OUTPUT_NAME kwin_effect)

View file

@ -1,4 +0,0 @@
kcoreaddons_add_plugin(kwin_packagestructure_scripts SOURCES scripts.cpp INSTALL_NAMESPACE "kf6/packagestructure")
target_link_libraries(kwin_packagestructure_scripts KF6::Package)
set_target_properties(kwin_packagestructure_scripts PROPERTIES OUTPUT_NAME kwin_script)

View file

@ -1,4 +0,0 @@
kcoreaddons_add_plugin(kwin_packagestructure_windowswitcher SOURCES windowswitcher.cpp INSTALL_NAMESPACE "kf6/packagestructure")
target_link_libraries(kwin_packagestructure_windowswitcher KF6::Package)
set_target_properties(kwin_packagestructure_windowswitcher PROPERTIES OUTPUT_NAME kwin_windowswitcher)