Merge contents of effects/, scripts/ and plugins/

It's confusing to have three directories that refer to extensions. To
clear things up, let's move them in the same directory.
This commit is contained in:
Vlad Zahorodnii 2023-04-21 09:58:40 +03:00
parent bbc7caaae7
commit a293c39105
407 changed files with 116 additions and 119 deletions

View file

@ -9,8 +9,6 @@ set_property(TARGET KWinEffectsInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(KWinEffectsInterface Qt::DBus)
add_subdirectory(effects)
add_subdirectory(scripts)
add_subdirectory(helpers)
add_subdirectory(qml)
@ -270,6 +268,8 @@ target_sources(kwin PRIVATE
)
add_subdirectory(backends)
add_subdirectory(platformsupport)
add_subdirectory(plugins)
add_subdirectory(utils)
add_subdirectory(wayland)
add_subdirectory(xwayland)
@ -337,9 +337,6 @@ if (HAVE_LIBCAP)
)
endif()
add_subdirectory(platformsupport)
add_subdirectory(plugins)
target_link_libraries(kwin_wayland
KWinQpaPlugin
KF6GlobalAccelKWinPlugin

View file

@ -1,95 +0,0 @@
add_subdirectory(private)
function(kwin_add_effect_config name)
list(REMOVE_ITEM ARGV ${name})
kcoreaddons_add_plugin(${name} INSTALL_NAMESPACE "kwin/effects/configs" SOURCES ${ARGV})
target_compile_definitions(${name} PRIVATE -DTRANSLATION_DOMAIN=\"kwin\")
endfunction()
# Add a CMake-time check for python3 to avoid failures during build.
find_package (Python3 COMPONENTS Interpreter)
add_feature_info("Python3" Python3_Interpreter_FOUND "Required to strip effects metadata")
set(KSEM_EXE "${CMAKE_CURRENT_SOURCE_DIR}/strip-effect-metadata.py")
function (kwin_strip_builtin_effect_metadata target metadata)
set(stripped_metadata "${CMAKE_CURRENT_BINARY_DIR}/${metadata}.stripped")
set(command ${KSEM_EXE} --source=${metadata} --output=${stripped_metadata})
add_custom_command(
OUTPUT ${stripped_metadata}
COMMAND ${command}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${metadata}
COMMENT "Stripping ${metadata}..."
)
set_property(TARGET ${target} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${stripped_metadata})
endfunction()
macro(kwin_add_builtin_effect name)
kcoreaddons_add_plugin(${name} STATIC SOURCES ${ARGN} INSTALL_NAMESPACE "kwin/effects/plugins")
target_compile_definitions(${name} PRIVATE -DTRANSLATION_DOMAIN=\"kwin\")
set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
kwin_strip_builtin_effect_metadata(${name} metadata.json)
install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/kwin/builtin-effects/ RENAME ${name}.json)
endmacro()
function(kwin_add_scripted_effect name source)
kpackage_install_package(${source} ${name} effects kwin)
# necessary so tests are found without installing
file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/${name})
endfunction()
add_subdirectory(backgroundcontrast)
add_subdirectory(blendchanges)
add_subdirectory(blur)
add_subdirectory(colorpicker)
add_subdirectory(desktopgrid)
add_subdirectory(dialogparent)
add_subdirectory(diminactive)
add_subdirectory(dimscreen)
add_subdirectory(eyeonscreen)
add_subdirectory(fade)
add_subdirectory(fadedesktop)
add_subdirectory(fadingpopups)
add_subdirectory(fallapart)
add_subdirectory(frozenapp)
add_subdirectory(fullscreen)
add_subdirectory(glide)
add_subdirectory(highlightwindow)
add_subdirectory(invert)
add_subdirectory(kscreen)
add_subdirectory(login)
add_subdirectory(logout)
add_subdirectory(magiclamp)
add_subdirectory(magnifier)
add_subdirectory(maximize)
add_subdirectory(morphingpopups)
add_subdirectory(mouseclick)
add_subdirectory(mousemark)
add_subdirectory(outputlocator)
add_subdirectory(overview)
add_subdirectory(scale)
add_subdirectory(screenedge)
add_subdirectory(screenshot)
add_subdirectory(screentransform)
add_subdirectory(sessionquit)
add_subdirectory(sheet)
add_subdirectory(showfps)
add_subdirectory(showpaint)
add_subdirectory(slide)
add_subdirectory(slideback)
add_subdirectory(slidingpopups)
add_subdirectory(snaphelper)
add_subdirectory(squash)
add_subdirectory(startupfeedback)
add_subdirectory(thumbnailaside)
add_subdirectory(tileseditor)
add_subdirectory(touchpoints)
add_subdirectory(trackmouse)
add_subdirectory(translucency)
add_subdirectory(windowaperture)
add_subdirectory(windowview)
add_subdirectory(wobblywindows)
add_subdirectory(zoom)

View file

@ -1,11 +1,118 @@
add_subdirectory(kglobalaccel)
add_subdirectory(qpa)
add_subdirectory(idletime)
add_subdirectory(windowsystem)
add_subdirectory(kpackage)
add_subdirectory(nightcolor)
add_subdirectory(colord-integration)
function(kwin_add_effect_config name)
list(REMOVE_ITEM ARGV ${name})
kcoreaddons_add_plugin(${name} INSTALL_NAMESPACE "kwin/effects/configs" SOURCES ${ARGV})
target_compile_definitions(${name} PRIVATE -DTRANSLATION_DOMAIN=\"kwin\")
endfunction()
# Add a CMake-time check for python3 to avoid failures during build.
find_package (Python3 COMPONENTS Interpreter)
add_feature_info("Python3" Python3_Interpreter_FOUND "Required to strip effects metadata")
set(KSEM_EXE "${CMAKE_CURRENT_SOURCE_DIR}/strip-effect-metadata.py")
function (kwin_strip_builtin_effect_metadata target metadata)
set(stripped_metadata "${CMAKE_CURRENT_BINARY_DIR}/${metadata}.stripped")
set(command ${KSEM_EXE} --source=${metadata} --output=${stripped_metadata})
add_custom_command(
OUTPUT ${stripped_metadata}
COMMAND ${command}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${metadata}
COMMENT "Stripping ${metadata}..."
)
set_property(TARGET ${target} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${stripped_metadata})
endfunction()
macro(kwin_add_builtin_effect name)
kcoreaddons_add_plugin(${name} STATIC SOURCES ${ARGN} INSTALL_NAMESPACE "kwin/effects/plugins")
target_compile_definitions(${name} PRIVATE -DTRANSLATION_DOMAIN=\"kwin\")
set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
kwin_strip_builtin_effect_metadata(${name} metadata.json)
install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/kwin/builtin-effects/ RENAME ${name}.json)
endmacro()
function(kwin_add_scripted_effect name source)
kpackage_install_package(${source} ${name} effects kwin)
# necessary so tests are found without installing
file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/${name})
endfunction()
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 ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/${name})
endfunction()
add_subdirectory(private)
add_subdirectory(backgroundcontrast)
add_subdirectory(blendchanges)
add_subdirectory(blur)
add_subdirectory(buttonrebinds)
add_subdirectory(colord-integration)
add_subdirectory(colorpicker)
add_subdirectory(desktopchangeosd)
add_subdirectory(desktopgrid)
add_subdirectory(dialogparent)
add_subdirectory(diminactive)
add_subdirectory(dimscreen)
add_subdirectory(eyeonscreen)
add_subdirectory(fade)
add_subdirectory(fadedesktop)
add_subdirectory(fadingpopups)
add_subdirectory(fallapart)
add_subdirectory(frozenapp)
add_subdirectory(fullscreen)
add_subdirectory(glide)
add_subdirectory(highlightwindow)
add_subdirectory(idletime)
add_subdirectory(invert)
add_subdirectory(kglobalaccel)
add_subdirectory(kpackage)
add_subdirectory(kscreen)
add_subdirectory(login)
add_subdirectory(logout)
add_subdirectory(magiclamp)
add_subdirectory(magnifier)
add_subdirectory(maximize)
add_subdirectory(minimizeall)
add_subdirectory(morphingpopups)
add_subdirectory(mouseclick)
add_subdirectory(mousemark)
add_subdirectory(nightcolor)
add_subdirectory(outputlocator)
add_subdirectory(overview)
add_subdirectory(qpa)
add_subdirectory(scale)
add_subdirectory(screenedge)
add_subdirectory(screenshot)
add_subdirectory(screentransform)
add_subdirectory(sessionquit)
add_subdirectory(sheet)
add_subdirectory(showfps)
add_subdirectory(showpaint)
add_subdirectory(slide)
add_subdirectory(slideback)
add_subdirectory(slidingpopups)
add_subdirectory(snaphelper)
add_subdirectory(squash)
add_subdirectory(startupfeedback)
add_subdirectory(synchronizeskipswitcher)
add_subdirectory(thumbnailaside)
add_subdirectory(tileseditor)
add_subdirectory(touchpoints)
add_subdirectory(trackmouse)
add_subdirectory(translucency)
add_subdirectory(videowall)
add_subdirectory(windowaperture)
add_subdirectory(windowsystem)
add_subdirectory(windowview)
add_subdirectory(wobblywindows)
add_subdirectory(zoom)
if (KWIN_BUILD_DECORATIONS)
add_subdirectory(kdecorations)
endif()

Some files were not shown because too many files have changed in this diff Show more