scripts: Encapsulate cmake code

This commit is contained in:
Vlad Zahorodnii 2023-04-21 09:51:08 +03:00
parent f4af66d167
commit bbc7caaae7
16 changed files with 11 additions and 7 deletions

View file

@ -1,12 +1,12 @@
function(add_kwin_script name)
kpackage_install_package(${name} ${name} scripts kwin)
function(kwin_add_script name source)
kpackage_install_package(${source} ${name} scripts kwin)
# Copy the script to the build directory so one can run tests without prior
# make install. FIXME: use add_custom_command.
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()
add_kwin_script(videowall)
add_kwin_script(synchronizeskipswitcher)
add_kwin_script(desktopchangeosd)
add_kwin_script(minimizeall)
add_subdirectory(desktopchangeosd)
add_subdirectory(minimizeall)
add_subdirectory(synchronizeskipswitcher)
add_subdirectory(videowall)

View file

@ -0,0 +1 @@
kwin_add_script(desktopchangeosd package)

View file

@ -0,0 +1 @@
kwin_add_script(minimizeall package)

View file

@ -0,0 +1 @@
kwin_add_script(synchronizeskipswitcher package)

View file

@ -0,0 +1 @@
kwin_add_script(videowall package)