2014-04-29 06:25:19 +00:00
|
|
|
# KI18N Translation Domain for this library
|
2015-01-28 08:46:31 +00:00
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kwin_effects\" -DEFFECT_BUILTINS)
|
2014-04-29 06:25:19 +00:00
|
|
|
|
2021-02-09 19:31:40 +00:00
|
|
|
include_directories(${KWin_SOURCE_DIR}/src) # for xcbutils.h
|
2014-04-16 12:27:48 +00:00
|
|
|
|
2021-12-22 20:40:20 +00:00
|
|
|
function(kwin_add_effect_config name)
|
|
|
|
list(REMOVE_ITEM ARGV ${name})
|
|
|
|
kcoreaddons_add_plugin(${name} INSTALL_NAMESPACE "kwin/effects/configs" SOURCES ${ARGV})
|
|
|
|
endfunction()
|
|
|
|
|
2022-02-20 20:20:52 +00:00
|
|
|
# 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")
|
2021-10-28 12:55:45 +00:00
|
|
|
|
|
|
|
function (kwin_strip_builtin_effect_metadata target metadata)
|
|
|
|
set(stripped_metadata "${CMAKE_CURRENT_BINARY_DIR}/${metadata}.stripped")
|
|
|
|
|
2022-02-20 20:20:52 +00:00
|
|
|
set(command ${KSEM_EXE} --source=${metadata} --output=${stripped_metadata})
|
2021-10-28 12:55:45 +00:00
|
|
|
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()
|
|
|
|
|
2021-10-23 11:56:00 +00:00
|
|
|
macro(KWIN4_ADD_EFFECT_MODULE name)
|
2021-10-23 16:18:47 +00:00
|
|
|
kcoreaddons_add_plugin(${name} STATIC SOURCES ${ARGN} INSTALL_NAMESPACE "kwin/effects/plugins")
|
2021-10-28 12:55:45 +00:00
|
|
|
kwin_strip_builtin_effect_metadata(${name} metadata.json)
|
2021-10-15 11:11:36 +00:00
|
|
|
install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/builtin-effects/${name}/)
|
2021-10-09 13:43:07 +00:00
|
|
|
endmacro()
|
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Install the KWin/Effect service type
|
2022-03-09 16:31:43 +00:00
|
|
|
install(FILES kwineffect.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPESDIR})
|
2007-05-22 16:58:10 +00:00
|
|
|
|
2012-02-02 13:39:39 +00:00
|
|
|
# scripted effects
|
2019-07-16 15:04:43 +00:00
|
|
|
function(install_scripted_effect name)
|
|
|
|
kpackage_install_package(${name}/package kwin4_effect_${name} effects kwin)
|
|
|
|
|
|
|
|
# necessary so tests are found without installing
|
|
|
|
file(COPY ${name}/package/contents ${name}/package/metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_${name})
|
|
|
|
endfunction()
|
|
|
|
install_scripted_effect(dialogparent)
|
|
|
|
install_scripted_effect(dimscreen)
|
|
|
|
install_scripted_effect(eyeonscreen)
|
|
|
|
install_scripted_effect(fade)
|
|
|
|
install_scripted_effect(fadedesktop)
|
|
|
|
install_scripted_effect(fadingpopups)
|
|
|
|
install_scripted_effect(frozenapp)
|
2020-08-05 20:33:01 +00:00
|
|
|
install_scripted_effect(fullscreen)
|
2019-07-16 15:04:43 +00:00
|
|
|
install_scripted_effect(login)
|
|
|
|
install_scripted_effect(logout)
|
|
|
|
install_scripted_effect(maximize)
|
|
|
|
install_scripted_effect(morphingpopups)
|
|
|
|
install_scripted_effect(scale)
|
|
|
|
install_scripted_effect(squash)
|
|
|
|
install_scripted_effect(translucency)
|
|
|
|
install_scripted_effect(windowaperture)
|
2019-11-01 17:14:55 +00:00
|
|
|
install_scripted_effect(sessionquit)
|
2012-02-02 16:58:31 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
###############################################################################
|
|
|
|
# Built-in effects go here
|
|
|
|
|
|
|
|
# Common effects
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(colorpicker)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(desktopgrid)
|
|
|
|
add_subdirectory(diminactive)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(fallapart)
|
|
|
|
add_subdirectory(highlightwindow)
|
|
|
|
add_subdirectory(kscreen)
|
|
|
|
add_subdirectory(screentransform)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(magiclamp)
|
2021-07-20 09:48:48 +00:00
|
|
|
add_subdirectory(overview)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(presentwindows)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(screenedge)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(showfps)
|
|
|
|
add_subdirectory(showpaint)
|
|
|
|
add_subdirectory(slide)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(slideback)
|
|
|
|
add_subdirectory(slidingpopups)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(thumbnailaside)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(touchpoints)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(zoom)
|
2007-10-21 13:44:40 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# OpenGL-specific effects
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(blur)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(backgroundcontrast)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(glide)
|
|
|
|
add_subdirectory(invert)
|
|
|
|
add_subdirectory(lookingglass)
|
|
|
|
add_subdirectory(magnifier)
|
|
|
|
add_subdirectory(mouseclick)
|
|
|
|
add_subdirectory(mousemark)
|
2021-10-09 13:43:07 +00:00
|
|
|
add_subdirectory(screenshot)
|
|
|
|
add_subdirectory(sheet)
|
|
|
|
add_subdirectory(snaphelper)
|
|
|
|
add_subdirectory(startupfeedback)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(trackmouse)
|
|
|
|
add_subdirectory(wobblywindows)
|