kwin: Improve add_kwin_script CMake function

This commit is contained in:
Devin Lin 2023-11-12 23:05:38 -08:00
parent 3e727945a0
commit b59011c187

View file

@ -1,13 +1,13 @@
# SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org> # SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
function(add_kwin_script name) function(add_kwin_script name source)
kpackage_install_package(${name} ${name} scripts kwin) kpackage_install_package(${source} ${name} scripts kwin)
# Copy the script to the build directory so one can run tests without prior # Copy the script to the build directory so one can run tests without prior
# make install. FIXME: use add_custom_command. # make install.
file(COPY ${name} DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/) file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/${name})
endfunction() endfunction()
add_kwin_script(convergentwindows) add_kwin_script(convergentwindows convergentwindows)