kwin/src/effects/zoom/CMakeLists.txt
Vlad Zahorodnii 141947d2e8 effects: Link builtin effects with executables
The main motivation behind this change is to prepare kwin for importing
kwayland-server code in libkwin.

As is, builtin effects are linked with libkwin. Some builtin effects
have wayland specific code. If we move wayland stuff in libkwin, there's
going to be a circular dependency between kwin4_effect_builtins and
libkwin targets.

This change intends to break that dependency by linking builtin effects
to kwin executable.

The main issue with that is that EffectLoader would need to discover the
effects indirectly. QStaticPlugin is used for that purpose.

Besides breaking the cyclic dependency, it makes builtin effects use the
same plugin infrastructure in libkwineffects that external effects use.

Metadata in src/effects/effect_builtins.cpp was converted in a list of
python dictionaries, which was fed to a python script that generated
main.cpp and metadata.json files.
2021-10-19 09:12:15 +00:00

44 lines
957 B
CMake

#######################################
# Effect
set(zoom_SOURCES
main.cpp
zoom.cpp
)
if (HAVE_ACCESSIBILITY)
set(zoom_SOURCES ${zoom_SOURCES}
accessibilityintegration.cpp
)
endif()
kconfig_add_kcfg_files(zoom_SOURCES
zoomconfig.kcfgc
)
kwin4_add_effect_module(kwin4_effect_zoom ${zoom_SOURCES})
#######################################
# Config
set(kwin_zoom_config_SRCS zoom_config.cpp)
ki18n_wrap_ui(kwin_zoom_config_SRCS zoom_config.ui)
kconfig_add_kcfg_files(kwin_zoom_config_SRCS zoomconfig.kcfgc)
add_library(kwin_zoom_config MODULE ${kwin_zoom_config_SRCS})
target_link_libraries(kwin_zoom_config
KF5::ConfigWidgets
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_zoom_config zoom_config.desktop SERVICE_TYPES kcmodule.desktop)
install(
TARGETS
kwin_zoom_config
DESTINATION
${KDE_INSTALL_PLUGINDIR}/kwin/effects/configs
)