Commit e1024d38 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

cmake: Specify link libraries per effect target

This allows to track per effect dependencies more precisely. The main
problem with a library and a comment next to it saying who needs it is
that the comment can get easily outdated.
parent f055efc9
......@@ -38,59 +38,8 @@ function (kwin_strip_builtin_effect_metadata target metadata)
set_property(TARGET ${target} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${stripped_metadata})
endfunction()
if (HAVE_ACCESSIBILITY)
include_directories(${QACCESSIBILITYCLIENT_INCLUDE_DIR})
endif()
set(kwin_effect_OWN_LIBS
kwineffects
)
set(kwin_effect_KDE_LIBS
KF5::ConfigGui
KF5::ConfigWidgets
KF5::GlobalAccel
KF5::I18n
KF5::Notifications # screenshot effect
KF5::Plasma # screenedge effect
KF5::WindowSystem
KF5::Service # utils / screenshot effect
KDecoration2::KDecoration # blur effect
Plasma::KWaylandServer
)
if (HAVE_ACCESSIBILITY)
set(kwin_effect_KDE_LIBS ${kwin_effect_KDE_LIBS} ${QACCESSIBILITYCLIENT_LIBRARY})
endif()
set(kwin_effect_QT_LIBS
Qt::Concurrent
Qt::DBus
Qt::Quick
Qt::X11Extras
)
set(kwin_effect_XLIB_LIBS
${X11_X11_LIB}
)
set(kwin_effect_XCB_LIBS
XCB::IMAGE
XCB::XCB
XCB::XFIXES
)
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglutils)
macro(KWIN4_ADD_EFFECT_MODULE name)
kcoreaddons_add_plugin(${name} STATIC SOURCES ${ARGN} INSTALL_NAMESPACE "kwin/effects/plugins")
target_link_libraries(${name} PRIVATE
${kwin_effect_KDE_LIBS}
${kwin_effect_OWN_LIBS}
${kwin_effect_QT_LIBS}
${kwin_effect_XCB_LIBS}
${kwin_effect_XLIB_LIBS}
)
kwin_strip_builtin_effect_metadata(${name} metadata.json)
install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/builtin-effects/${name}/)
endmacro()
......
......@@ -8,3 +8,9 @@ set(contrast_SOURCES
main.cpp
)
kwin4_add_effect_module(kwin4_effect_contrast ${contrast_SOURCES})
target_link_libraries(kwin4_effect_contrast PRIVATE
kwineffects
kwinglutils
Plasma::KWaylandServer
)
......@@ -12,6 +12,16 @@ kconfig_add_kcfg_files(blur_SOURCES
)
kwin4_add_effect_module(kwin4_effect_blur ${blur_SOURCES})
target_link_libraries(kwin4_effect_blur PRIVATE
kwineffects
kwinglutils
Plasma::KWaylandServer
KF5::ConfigGui
KDecoration2::KDecoration
)
#######################################
# Config
......
......@@ -7,3 +7,10 @@ set(colorpicker_SOURCES
)
kwin4_add_effect_module(kwin4_effect_colorpicker ${colorpicker_SOURCES})
target_link_libraries(kwin4_effect_colorpicker PRIVATE
kwineffects
KF5::I18n
Qt::DBus
)
......@@ -12,6 +12,15 @@ kconfig_add_kcfg_files(desktopgrid_SOURCES
)
kwin4_add_effect_module(kwin4_effect_desktopgrid ${desktopgrid_SOURCES})
target_link_libraries(kwin4_effect_desktopgrid PRIVATE
kwineffects
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
Qt::Quick
)
#######################################
# Config
......
......@@ -11,6 +11,11 @@ kconfig_add_kcfg_files(diminactive_SOURCES
)
kwin4_add_effect_module(kwin4_effect_diminactive ${diminactive_SOURCES})
target_link_libraries(kwin4_effect_diminactive PRIVATE
kwineffects
KF5::ConfigGui
)
#######################################
# Config
......
......@@ -12,3 +12,8 @@ kconfig_add_kcfg_files(fallapart_SOURCES
)
kwin4_add_effect_module(kwin4_effect_fallapart ${fallapart_SOURCES})
target_link_libraries(kwin4_effect_fallapart PRIVATE
kwineffects
KF5::ConfigGui
)
......@@ -11,6 +11,11 @@ kconfig_add_kcfg_files(glide_SOURCES
)
kwin4_add_effect_module(kwin4_effect_glide ${glide_SOURCES})
target_link_libraries(kwin4_effect_glide PRIVATE
kwineffects
KF5::ConfigGui
)
#######################################
# Config
......
......@@ -8,3 +8,8 @@ set(highlightwindow_SOURCES
)
kwin4_add_effect_module(kwin4_effect_highlightwindow ${highlightwindow_SOURCES})
target_link_libraries(kwin4_effect_highlightwindow PRIVATE
kwineffects
Qt::DBus
)
......@@ -8,6 +8,13 @@ set(invert_SOURCES
)
kwin4_add_effect_module(kwin4_effect_invert ${invert_SOURCES})
target_link_libraries(kwin4_effect_invert PRIVATE
kwineffects
kwinglutils
KF5::GlobalAccel
KF5::I18n
)
#######################################
# Config
......
......@@ -9,3 +9,8 @@ set(kscreen_SOURCES
kconfig_add_kcfg_files(kscreen_SOURCES kscreenconfig.kcfgc)
kwin4_add_effect_module(kwin4_effect_kscreen ${kscreen_SOURCES})
target_link_libraries(kwin4_effect_kscreen PRIVATE
kwineffects
KF5::ConfigGui
)
......@@ -12,6 +12,15 @@ kconfig_add_kcfg_files(lookingglass_SOURCES
)
kwin4_add_effect_module(kwin4_effect_lookingglass ${lookingglass_SOURCES})
target_link_libraries(kwin4_effect_lookingglass PRIVATE
kwineffects
kwinglutils
KF5::ConfigGui
KF5::ConfigWidgets
KF5::GlobalAccel
KF5::I18n
)
#######################################
# Config
......
......@@ -11,6 +11,11 @@ kconfig_add_kcfg_files(magiclamp_SOURCES
)
kwin4_add_effect_module(kwin4_effect_magiclamp ${magiclamp_SOURCES})
target_link_libraries(kwin4_effect_magiclamp PRIVATE
kwineffects
KF5::ConfigGui
)
#######################################
# Config
......
......@@ -11,6 +11,15 @@ kconfig_add_kcfg_files(magnifier_SOURCES
)
kwin4_add_effect_module(kwin4_effect_magnifier ${magnifier_SOURCES})
target_link_libraries(kwin4_effect_magnifier PRIVATE
kwineffects
kwinglutils
KF5::ConfigGui
KF5::ConfigWidgets
KF5::GlobalAccel
KF5::I18n
)
#######################################
# Config
......
......@@ -11,6 +11,14 @@ kconfig_add_kcfg_files(mouseclick_SOURCES
)
kwin4_add_effect_module(kwin4_effect_mouseclick ${mouseclick_SOURCES})
target_link_libraries(kwin4_effect_mouseclick PRIVATE
kwineffects
kwinglutils
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
)
##########################
## configurtion dialog
......
......@@ -11,6 +11,14 @@ kconfig_add_kcfg_files(mousemark_SOURCES
)
kwin4_add_effect_module(kwin4_effect_mousemark ${mousemark_SOURCES})
target_link_libraries(kwin4_effect_mousemark PRIVATE
kwineffects
kwinglutils
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
)
#######################################
# Config
......
......@@ -16,5 +16,14 @@ kconfig_add_kcfg_files(overview_SOURCES
)
kwin4_add_effect_module(kwin4_effect_overview ${overview_SOURCES})
target_link_libraries(kwin4_effect_overview PRIVATE
kwineffects
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
Qt::Quick
)
install(DIRECTORY qml DESTINATION ${KDE_INSTALL_DATADIR}/kwin/effects/overview)
......@@ -13,6 +13,17 @@ kconfig_add_kcfg_files(presentwindows_SOURCES
)
kwin4_add_effect_module(kwin4_effect_presentwindows ${presentwindows_SOURCES})
target_link_libraries(kwin4_effect_presentwindows PRIVATE
kwineffects
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
Qt::DBus
Qt::Qml
Qt::Quick
)
#######################################
# Config
......
......@@ -8,3 +8,9 @@ set(screenedge_SOURCES
)
kwin4_add_effect_module(kwin4_effect_screenedge ${screenedge_SOURCES})
target_link_libraries(kwin4_effect_screenedge PRIVATE
kwineffects
kwinglutils
KF5::Plasma
)
......@@ -12,6 +12,17 @@ set(screenshot_SOURCES
qt_add_dbus_adaptor(screenshot_SOURCES org.kde.KWin.ScreenShot2.xml screenshotdbusinterface2.h KWin::ScreenShotDBusInterface2)
kwin4_add_effect_module(kwin4_effect_screenshot ${screenshot_SOURCES})
target_link_libraries(kwin4_effect_screenshot PRIVATE
kwineffects
kwinglutils
KF5::Notifications
KF5::Service
KF5::I18n
Qt::Concurrent
Qt::DBus
)
ecm_qt_declare_logging_category(kwin4_effect_screenshot
HEADER screenshotlogging.h
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment