diff --git a/CMakeLists.txt b/CMakeLists.txt index c847d123d..9f167e107 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,746 +1,747 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) project(KWIN) set(PROJECT_VERSION "5.16.80") set(PROJECT_VERSION_MAJOR 5) set(QT_MIN_VERSION "5.12.0") set(KF5_MIN_VERSION "5.62.0") -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} ) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) find_package(ECM 5.38 REQUIRED NO_MODULE) include(FeatureSummary) include(WriteBasicConfigVersionFile) include(GenerateExportHeader) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Concurrent Core DBus Quick QuickWidgets Script Sensors UiTools Widgets X11Extras ) find_package(Qt5Test ${QT_MIN_VERSION} CONFIG QUIET) set_package_properties(Qt5Test PROPERTIES - PURPOSE "Required for tests" - TYPE OPTIONAL - ) + PURPOSE "Required for tests" + TYPE OPTIONAL +) add_feature_info("Qt5Test" Qt5Test_FOUND "Required for building tests") if (NOT Qt5Test_FOUND) set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.") endif() include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) include(ECMOptionalAddSubdirectory) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER -DQT_NO_URL_CAST_FROM_STRING) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt5Multimedia QUIET) set_package_properties(Qt5Multimedia PROPERTIES - PURPOSE "Runtime-only dependency for effect video playback" - TYPE RUNTIME - ) - + PURPOSE "Runtime-only dependency for effect video playback" + TYPE RUNTIME +) # required frameworks by Core find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config ConfigWidgets CoreAddons Crash GlobalAccel I18n IconThemes IdleTime Init Notifications Package Plasma Wayland WidgetsAddons WindowSystem ) # required frameworks by config modules find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Completion Declarative KCMUtils KIO NewStuff Service TextWidgets XmlGui ) find_package(Threads) set_package_properties(Threads PROPERTIES - PURPOSE "Needed for VirtualTerminal support in KWin Wayland" - TYPE REQUIRED - ) + PURPOSE "Needed for VirtualTerminal support in KWin Wayland" + TYPE REQUIRED +) # optional frameworks find_package(KF5Activities ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5Activities PROPERTIES - PURPOSE "Enable building of KWin with kactivities support" - TYPE OPTIONAL - ) + PURPOSE "Enable building of KWin with kactivities support" + TYPE OPTIONAL +) add_feature_info("KF5Activities" KF5Activities_FOUND "Enable building of KWin with kactivities support") find_package(KF5DocTools ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5DocTools PROPERTIES - PURPOSE "Enable building documentation" - TYPE OPTIONAL - ) + PURPOSE "Enable building documentation" + TYPE OPTIONAL +) add_feature_info("KF5DocTools" KF5DocTools_FOUND "Enable building documentation") find_package(KF5Kirigami2 ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5Kirigami2 PROPERTIES DESCRIPTION "A QtQuick based components set" PURPOSE "Required at runtime for Virtual desktop KCM and the virtual keyboard" TYPE RUNTIME ) find_package(KDecoration2 5.13.0 CONFIG REQUIRED) find_package(KScreenLocker CONFIG REQUIRED) set_package_properties(KScreenLocker PROPERTIES - TYPE REQUIRED - PURPOSE "For screenlocker integration in kwin_wayland") + TYPE REQUIRED + PURPOSE "For screenlocker integration in kwin_wayland" +) find_package(Breeze 5.9.0 CONFIG) set_package_properties(Breeze PROPERTIES - TYPE OPTIONAL - PURPOSE "For setting the default window decoration plugin") -if(${Breeze_FOUND}) - if(${BREEZE_WITH_KDECORATION}) + TYPE OPTIONAL + PURPOSE "For setting the default window decoration plugin" +) +if (${Breeze_FOUND}) + if (${BREEZE_WITH_KDECORATION}) set(HAVE_BREEZE_DECO true) else() set(HAVE_BREEZE_DECO FALSE) endif() else() set(HAVE_BREEZE_DECO FALSE) endif() add_feature_info("Breeze-Decoration" HAVE_BREEZE_DECO "Default decoration plugin Breeze") find_package(EGL) set_package_properties(EGL PROPERTIES - TYPE RUNTIME - PURPOSE "Required to build KWin with EGL support" - ) + TYPE RUNTIME + PURPOSE "Required to build KWin with EGL support" +) find_package(epoxy) -set_package_properties(epoxy PROPERTIES DESCRIPTION "libepoxy" - URL "https://github.com/anholt/libepoxy" - TYPE REQUIRED - PURPOSE "OpenGL dispatch library" - ) +set_package_properties(epoxy PROPERTIES + DESCRIPTION "libepoxy" + URL "https://github.com/anholt/libepoxy" + TYPE REQUIRED + PURPOSE "OpenGL dispatch library" +) set(HAVE_DL_LIBRARY FALSE) -if(epoxy_HAS_GLX) +if (epoxy_HAS_GLX) find_library(DL_LIBRARY dl) - if(DL_LIBRARY) + if (DL_LIBRARY) set(HAVE_DL_LIBRARY TRUE) endif() endif() find_package(Wayland 1.2 REQUIRED COMPONENTS Cursor OPTIONAL_COMPONENTS Egl) set_package_properties(Wayland PROPERTIES - TYPE REQUIRED - PURPOSE "Required for building KWin with Wayland support" - ) + TYPE REQUIRED + PURPOSE "Required for building KWin with Wayland support" +) add_feature_info("Wayland::EGL" Wayland_Egl_FOUND "Enable building of Wayland backend and QPA with EGL support.") set(HAVE_WAYLAND_EGL FALSE) -if(Wayland_Egl_FOUND) +if (Wayland_Egl_FOUND) set(HAVE_WAYLAND_EGL TRUE) endif() find_package(XKB 0.7.0) set_package_properties(XKB PROPERTIES - TYPE REQUIRED - PURPOSE "Required for building KWin with Wayland support" - ) + TYPE REQUIRED + PURPOSE "Required for building KWin with Wayland support" +) find_package(Libinput 1.9) set_package_properties(Libinput PROPERTIES TYPE REQUIRED PURPOSE "Required for input handling on Wayland.") find_package(UDev) -set_package_properties(UDev PROPERTIES URL "http://www.freedesktop.org/software/systemd/libudev/" - DESCRIPTION "Linux device library." - TYPE REQUIRED - PURPOSE "Required for input handling on Wayland." - ) +set_package_properties(UDev PROPERTIES + URL "http://www.freedesktop.org/software/systemd/libudev/" + DESCRIPTION "Linux device library." + TYPE REQUIRED + PURPOSE "Required for input handling on Wayland." +) find_package(Libdrm 2.4.62) set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.") set(HAVE_DRM FALSE) -if(Libdrm_FOUND) +if (Libdrm_FOUND) set(HAVE_DRM TRUE) endif() find_package(gbm) set_package_properties(gbm PROPERTIES TYPE OPTIONAL PURPOSE "Required for egl output of drm backend.") set(HAVE_GBM FALSE) -if(HAVE_DRM AND gbm_FOUND) +if (HAVE_DRM AND gbm_FOUND) set(HAVE_GBM TRUE) endif() option(KWIN_BUILD_EGL_STREAM_BACKEND "Enable building of EGLStream based DRM backend" ON) -if(HAVE_DRM AND KWIN_BUILD_EGL_STREAM_BACKEND) +if (HAVE_DRM AND KWIN_BUILD_EGL_STREAM_BACKEND) set(HAVE_EGL_STREAMS TRUE) endif() find_package(libhybris) set_package_properties(libhybris PROPERTIES TYPE OPTIONAL PURPOSE "Required for libhybris backend") set(HAVE_LIBHYBRIS ${libhybris_FOUND}) find_package(X11) -set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" - URL "https://www.x.org" - TYPE REQUIRED - ) +set_package_properties(X11 PROPERTIES + DESCRIPTION "X11 libraries" + URL "https://www.x.org" + TYPE REQUIRED +) add_feature_info("XInput" X11_Xinput_FOUND "Required for poll-free mouse cursor updates") set(HAVE_X11_XINPUT ${X11_Xinput_FOUND}) # All the required XCB components -find_package(XCB 1.10 - REQUIRED COMPONENTS - COMPOSITE - CURSOR - DAMAGE - GLX - ICCCM - IMAGE - KEYSYMS - RANDR - RENDER - SHAPE - SHM - SYNC - XCB - XFIXES +find_package(XCB 1.10 REQUIRED COMPONENTS + COMPOSITE + CURSOR + DAMAGE + GLX + ICCCM + IMAGE + KEYSYMS + RANDR + RENDER + SHAPE + SHM + SYNC + XCB + XFIXES ) set_package_properties(XCB PROPERTIES TYPE REQUIRED) # and the optional XCB dependencies if (XCB_ICCCM_VERSION VERSION_LESS "0.4") set(XCB_ICCCM_FOUND FALSE) endif() add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin") find_package(X11_XCB) set_package_properties(X11_XCB PROPERTIES - PURPOSE "Required for building X11 windowed backend of kwin_wayland" - TYPE OPTIONAL) + PURPOSE "Required for building X11 windowed backend of kwin_wayland" + TYPE OPTIONAL +) # dependencies for QPA plugin find_package(Qt5FontDatabaseSupport REQUIRED) find_package(Qt5ThemeSupport REQUIRED) find_package(Qt5EventDispatcherSupport REQUIRED) find_package(Freetype REQUIRED) -set_package_properties(Freetype PROPERTIES DESCRIPTION "A font rendering engine" - URL "https://www.freetype.org" - TYPE REQUIRED - PURPOSE "Needed for KWin's QPA plugin." - ) +set_package_properties(Freetype PROPERTIES + DESCRIPTION "A font rendering engine" + URL "https://www.freetype.org" + TYPE REQUIRED + PURPOSE "Needed for KWin's QPA plugin." +) find_package(Fontconfig REQUIRED) set_package_properties(Fontconfig PROPERTIES - TYPE REQUIRED - PURPOSE "Needed for KWin's QPA plugin." - ) + TYPE REQUIRED + PURPOSE "Needed for KWin's QPA plugin." +) find_package(Xwayland) set_package_properties(Xwayland PROPERTIES URL "https://x.org" DESCRIPTION "Xwayland X server" TYPE RUNTIME PURPOSE "Needed for running kwin_wayland" - ) +) find_package(Libcap) set_package_properties(Libcap PROPERTIES TYPE OPTIONAL PURPOSE "Needed for running kwin_wayland with real-time scheduling policy" ) set(HAVE_LIBCAP ${Libcap_FOUND}) include(ECMQMLModules) ecm_find_qmlmodule(QtQuick 2.3) ecm_find_qmlmodule(QtQuick.Controls 1.2) ecm_find_qmlmodule(QtQuick.Layouts 1.3) ecm_find_qmlmodule(QtQuick.VirtualKeyboard 2.1) ecm_find_qmlmodule(QtQuick.Window 2.1) ecm_find_qmlmodule(QtMultimedia 5.0) ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0) ecm_find_qmlmodule(org.kde.plasma.core 2.0) ecm_find_qmlmodule(org.kde.plasma.components 2.0) ########### configure tests ############### include(CMakeDependentOption) option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON) option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON) option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON) option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON) cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF) # Binary name of KWin set(KWIN_NAME "kwin") set(KWIN_INTERNAL_NAME_X11 "kwin_x11") set(KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland") set(KWIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled -if( KWIN_BUILD_XRENDER_COMPOSITING ) - set( KWIN_HAVE_XRENDER_COMPOSITING 1 ) +if (KWIN_BUILD_XRENDER_COMPOSITING) + set(KWIN_HAVE_XRENDER_COMPOSITING 1) endif() include_directories(${XKB_INCLUDE_DIR}) include_directories(${epoxy_INCLUDE_DIR}) set(HAVE_EPOXY_GLX ${epoxy_HAS_GLX}) # for things that are also used by kwin libraries configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h ) # for kwin internal things set(HAVE_X11_XCB ${X11_XCB_FOUND}) include(CheckIncludeFile) include(CheckIncludeFiles) include(CheckSymbolExists) check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(malloc.h HAVE_MALLOC_H) check_include_file("sys/prctl.h" HAVE_SYS_PRCTL_H) check_symbol_exists(PR_SET_DUMPABLE "sys/prctl.h" HAVE_PR_SET_DUMPABLE) check_symbol_exists(PR_SET_PDEATHSIG "sys/prctl.h" HAVE_PR_SET_PDEATHSIG) check_include_file("sys/procctl.h" HAVE_SYS_PROCCTL_H) check_symbol_exists(PROC_TRACE_CTL "sys/procctl.h" HAVE_PROC_TRACE_CTL) if (HAVE_PR_SET_DUMPABLE OR HAVE_PROC_TRACE_CTL) set(CAN_DISABLE_PTRACE TRUE) endif() add_feature_info("prctl/procctl tracing control" CAN_DISABLE_PTRACE "Required for disallowing ptrace on kwin_wayland process") check_include_file("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H) check_include_file("linux/vt.h" HAVE_LINUX_VT_H) add_feature_info("linux/vt.h" HAVE_LINUX_VT_H "Required for virtual terminal support under wayland") check_include_file("linux/fb.h" HAVE_LINUX_FB_H) add_feature_info("linux/fb.h" HAVE_LINUX_FB_H "Required for the fbdev backend") check_symbol_exists(SCHED_RESET_ON_FORK "sched.h" HAVE_SCHED_RESET_ON_FORK) add_feature_info("SCHED_RESET_ON_FORK" HAVE_SCHED_RESET_ON_FORK "Required for running kwin_wayland with real-time scheduling") -configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h ) +configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h) ########### global ############### set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects ${CMAKE_CURRENT_SOURCE_DIR}/effects ${CMAKE_CURRENT_SOURCE_DIR}/tabbox ${CMAKE_CURRENT_SOURCE_DIR}/platformsupport - ) +) -add_subdirectory( libkwineffects ) -if(KWIN_BUILD_KCMS) - add_subdirectory( kcmkwin ) +add_subdirectory(libkwineffects) +if (KWIN_BUILD_KCMS) + add_subdirectory(kcmkwin) endif() -add_subdirectory( data ) +add_subdirectory(data) -add_subdirectory( effects ) -add_subdirectory( scripts ) -add_subdirectory( tabbox ) +add_subdirectory(effects) +add_subdirectory(scripts) +add_subdirectory(tabbox) add_subdirectory(scripting) add_subdirectory(helpers) ########### next target ############### set(kwin_KDEINIT_SRCS abstract_client.cpp abstract_opengl_context_attribute_builder.cpp abstract_output.cpp abstract_wayland_output.cpp activation.cpp appmenu.cpp atoms.cpp client.cpp client_machine.cpp colorcorrection/colorcorrectdbusinterface.cpp colorcorrection/manager.cpp colorcorrection/suncalc.cpp composite.cpp cursor.cpp dbusinterface.cpp debug_console.cpp decorations/decoratedclient.cpp decorations/decorationbridge.cpp decorations/decorationpalette.cpp decorations/decorationrenderer.cpp decorations/decorations_logging.cpp decorations/settings.cpp deleted.cpp effectloader.cpp effects.cpp egl_context_attribute_builder.cpp events.cpp focuschain.cpp geometry.cpp geometrytip.cpp gestures.cpp globalshortcuts.cpp group.cpp idle_inhibition.cpp input.cpp input_event.cpp input_event_spy.cpp internal_client.cpp keyboard_input.cpp keyboard_layout.cpp keyboard_layout_switching.cpp keyboard_repeat.cpp killwindow.cpp layers.cpp libinput/connection.cpp libinput/context.cpp libinput/device.cpp libinput/events.cpp libinput/libinput_logging.cpp logind.cpp main.cpp manage.cpp modifier_only_shortcuts.cpp moving_client_x11_filter.cpp netinfo.cpp onscreennotification.cpp options.cpp orientation_sensor.cpp osd.cpp outline.cpp outputscreens.cpp overlaywindow.cpp placement.cpp platform.cpp pointer_input.cpp popup_input_filter.cpp rootinfo_filter.cpp rules.cpp scene.cpp screenedge.cpp screenlockerwatcher.cpp screens.cpp scripting/dbuscall.cpp scripting/meta.cpp scripting/screenedgeitem.cpp scripting/scriptedeffect.cpp scripting/scripting.cpp scripting/scripting_logging.cpp scripting/scripting_model.cpp scripting/scriptingutils.cpp scripting/timer.cpp scripting/workspace_wrapper.cpp shadow.cpp shell_client.cpp sm.cpp thumbnailitem.cpp toplevel.cpp touch_hide_cursor_spy.cpp touch_input.cpp udev.cpp unmanaged.cpp useractions.cpp utils.cpp virtualdesktops.cpp virtualdesktopsdbustypes.cpp virtualkeyboard.cpp virtualkeyboard_dbus.cpp was_user_interaction_x11_filter.cpp wayland_cursor_theme.cpp wayland_server.cpp window_property_notify_x11_filter.cpp workspace.cpp x11eventfilter.cpp xcbutils.cpp xkb.cpp xwl/xwayland_interface.cpp - ) +) include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS HEADER colorcorrect_logging.h IDENTIFIER KWIN_COLORCORRECTION CATEGORY_NAME kwin_colorcorrection DEFAULT_SEVERITY Critical ) -if(KWIN_BUILD_TABBOX) +if (KWIN_BUILD_TABBOX) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) - set( - kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} + set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} tabbox/clientmodel.cpp tabbox/desktopchain.cpp tabbox/desktopmodel.cpp tabbox/switcheritem.cpp tabbox/tabbox.cpp tabbox/tabbox_logging.cpp tabbox/tabboxconfig.cpp tabbox/tabboxhandler.cpp tabbox/x11_filter.cpp - ) + ) endif() -if(KWIN_BUILD_ACTIVITIES) - set( - kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} +if (KWIN_BUILD_ACTIVITIES) + set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} activities.cpp ) endif() if (HAVE_LINUX_VT_H) - set(kwin_KDEINIT_SRCS - ${kwin_KDEINIT_SRCS} - virtual_terminal.cpp - ) + set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} + virtual_terminal.cpp + ) endif() kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc) kconfig_add_kcfg_files(kwin_KDEINIT_SRCS colorcorrection/colorcorrect_settings.kcfgc) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface ) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface ) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface ) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl ) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface ) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor) +qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface) -qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) -qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface ) - -qt5_add_dbus_interface( kwin_KDEINIT_SRCS org.kde.kappmenu.xml appmenu_interface ) +qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface) +qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface) +qt5_add_dbus_interface(kwin_KDEINIT_SRCS org.kde.kappmenu.xml appmenu_interface) ki18n_wrap_ui(kwin_KDEINIT_SRCS debug_console.ui shortcutdialog.ui ) ########### target link libraries ############### set(kwin_OWN_LIBS kwin4_effect_builtins kwineffects ) set(kwin_QT_LIBS Qt5::Concurrent Qt5::DBus Qt5::Quick Qt5::Script Qt5::Sensors ) set(kwin_KDE_LIBS KDecoration2::KDecoration KDecoration2::KDecoration2Private KF5::ConfigCore KF5::ConfigWidgets KF5::CoreAddons KF5::GlobalAccel KF5::GlobalAccelPrivate KF5::I18n KF5::Notifications KF5::Package KF5::Plasma KF5::QuickAddons KF5::WindowSystem PW::KScreenLocker ) set(kwin_XLIB_LIBS ${X11_ICE_LIB} ${X11_SM_LIB} ${X11_X11_LIB} ) set(kwin_XCB_LIBS XCB::COMPOSITE XCB::DAMAGE XCB::GLX XCB::ICCCM XCB::KEYSYMS XCB::RANDR XCB::RENDER XCB::SHAPE XCB::SHM XCB::SYNC XCB::XCB XCB::XFIXES ) set(kwin_WAYLAND_LIBS KF5::WaylandClient KF5::WaylandServer Wayland::Cursor XKB::XKB ${CMAKE_THREAD_LIBS_INIT} ) -if(KWIN_BUILD_ACTIVITIES) +if (KWIN_BUILD_ACTIVITIES) set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities) endif() set(kwinLibs ${kwin_OWN_LIBS} ${kwin_QT_LIBS} ${kwin_KDE_LIBS} ${kwin_XLIB_LIBS} ${kwin_XCB_LIBS} ${kwin_WAYLAND_LIBS} ${UDEV_LIBS} Libinput::Libinput ) add_library(kwin SHARED ${kwin_KDEINIT_SRCS}) set_target_properties(kwin PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} - ) +) target_link_libraries(kwin ${kwinLibs}) generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h) target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY}) kf5_add_kdeinit_executable(kwin_x11 main_x11.cpp) target_link_libraries(kdeinit_kwin_x11 kwin KF5::Crash Qt5::X11Extras) -install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP ) -install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} ) -install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} ) +install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) +install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS}) set(kwin_XWAYLAND_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xwl/clipboard.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/databridge.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/dnd.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_wl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_x.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection_source.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/transfer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/xwl/xwayland.cpp - ) +) include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category(kwin_XWAYLAND_SRCS HEADER xwayland_logging.h IDENTIFIER KWIN_XWL CATEGORY_NAME kwin_xwl DEFAULT_SEVERITY Critical ) set(kwin_WAYLAND_SRCS main_wayland.cpp tabletmodemanager.cpp - ) +) add_executable(kwin_wayland ${kwin_WAYLAND_SRCS} ${kwin_XWAYLAND_SRCS}) target_link_libraries(kwin_wayland kwin KF5::Crash) if (HAVE_LIBCAP) target_link_libraries(kwin_wayland ${Libcap_LIBRARIES}) endif() -install(TARGETS kwin_wayland ${INSTALL_TARGETS_DEFAULT_ARGS} ) +install(TARGETS kwin_wayland ${INSTALL_TARGETS_DEFAULT_ARGS}) if (HAVE_LIBCAP) install( CODE "execute_process( COMMAND ${SETCAP_EXECUTABLE} CAP_SYS_NICE=+ep \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/kwin_wayland)" ) endif() add_subdirectory(platformsupport) add_subdirectory(plugins) ########### install files ############### -install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg ) -install( FILES colorcorrection/colorcorrect_settings.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}_colorcorrect.kcfg ) -install( FILES kwin.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} RENAME ${KWIN_NAME}.notifyrc) +install(FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg) +install(FILES colorcorrection/colorcorrect_settings.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}_colorcorrect.kcfg) +install(FILES kwin.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} RENAME ${KWIN_NAME}.notifyrc) install( FILES org.kde.KWin.VirtualDesktopManager.xml org.kde.KWin.xml org.kde.kwin.ColorCorrect.xml org.kde.kwin.Compositing.xml org.kde.kwin.Effects.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} ) -install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) # Install the KWin/Script service type -install( FILES scripting/kwinscript.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +install(FILES scripting/kwinscript.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) add_subdirectory(qml) if (BUILD_TESTING) add_subdirectory(autotests) add_subdirectory(tests) endif() if (KF5DocTools_FOUND) add_subdirectory(doc) endif() add_subdirectory(kconf_update) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) include(CMakePackageConfigHelpers) set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface") configure_package_config_file(KWinDBusInterfaceConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake" PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR}) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index d80a6f4cc..1bc894021 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -1,406 +1,405 @@ add_definitions(-DKWIN_UNIT_TEST) remove_definitions(-DQT_USE_QSTRINGBUILDER) add_subdirectory(libkwineffects) add_subdirectory(libxrenderutils) add_subdirectory(integration) add_subdirectory(libinput) if (HAVE_DRM) add_subdirectory(drm) endif() add_subdirectory(tabbox) ######################################################## # Test ScreenPaintData ######################################################## -set( testScreenPaintData_SRCS test_screen_paint_data.cpp ) +set(testScreenPaintData_SRCS test_screen_paint_data.cpp) add_executable(testScreenPaintData ${testScreenPaintData_SRCS}) -target_link_libraries( testScreenPaintData kwineffects Qt5::Test Qt5::Widgets KF5::WindowSystem) +target_link_libraries(testScreenPaintData kwineffects Qt5::Test Qt5::Widgets KF5::WindowSystem) add_test(NAME kwin-testScreenPaintData COMMAND testScreenPaintData) ecm_mark_as_test(testScreenPaintData) ######################################################## # Test WindowPaintData ######################################################## -set( testWindowPaintData_SRCS test_window_paint_data.cpp ) +set(testWindowPaintData_SRCS test_window_paint_data.cpp) add_executable(testWindowPaintData ${testWindowPaintData_SRCS}) -target_link_libraries( testWindowPaintData kwineffects Qt5::Widgets Qt5::Test ) +target_link_libraries(testWindowPaintData kwineffects Qt5::Widgets Qt5::Test ) add_test(NAME kwin-testWindowPaintData COMMAND testWindowPaintData) ecm_mark_as_test(testWindowPaintData) ######################################################## # Test VirtualDesktopManager ######################################################## -set( testVirtualDesktops_SRCS - test_virtual_desktops.cpp - ../virtualdesktops.cpp +set(testVirtualDesktops_SRCS + ../virtualdesktops.cpp + test_virtual_desktops.cpp ) add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS}) -target_link_libraries( testVirtualDesktops - Qt5::Test - Qt5::Widgets - KF5::I18n - KF5::GlobalAccel - KF5::ConfigCore - KF5::WindowSystem - KF5::WaylandServer +target_link_libraries(testVirtualDesktops + KF5::ConfigCore + KF5::GlobalAccel + KF5::I18n + KF5::WaylandServer + KF5::WindowSystem + Qt5::Test + Qt5::Widgets ) add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops) ecm_mark_as_test(testVirtualDesktops) ######################################################## # Test ClientMachine ######################################################## -set( testClientMachine_SRCS - test_client_machine.cpp - ../client_machine.cpp +set(testClientMachine_SRCS + ../client_machine.cpp + test_client_machine.cpp ) -add_executable( testClientMachine ${testClientMachine_SRCS} ) +add_executable(testClientMachine ${testClientMachine_SRCS}) set_target_properties(testClientMachine PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") -target_link_libraries( testClientMachine - Qt5::Concurrent - Qt5::Test - Qt5::X11Extras - Qt5::Widgets - KF5::ConfigCore - KF5::WindowSystem - XCB::XCB - XCB::XFIXES - ${X11_X11_LIB} # to make jenkins happy +target_link_libraries(testClientMachine + ${X11_X11_LIB} # to make jenkins happy + KF5::ConfigCore + KF5::WindowSystem + Qt5::Concurrent + Qt5::Test + Qt5::Widgets + Qt5::X11Extras + XCB::XCB + XCB::XFIXES ) add_test(NAME kwin-testClientMachine COMMAND testClientMachine) ecm_mark_as_test(testClientMachine) ######################################################## # Test XcbWrapper ######################################################## -set( testXcbWrapper_SRCS - test_xcb_wrapper.cpp +set(testXcbWrapper_SRCS + test_xcb_wrapper.cpp ) -add_executable( testXcbWrapper ${testXcbWrapper_SRCS} ) - -target_link_libraries( testXcbWrapper - Qt5::Test - Qt5::X11Extras - Qt5::Widgets - KF5::ConfigCore - KF5::WindowSystem - XCB::XCB +add_executable(testXcbWrapper ${testXcbWrapper_SRCS}) + +target_link_libraries(testXcbWrapper + KF5::ConfigCore + KF5::WindowSystem + Qt5::Test + Qt5::Widgets + Qt5::X11Extras + XCB::XCB ) add_test(NAME kwin-testXcbWrapper COMMAND testXcbWrapper) ecm_mark_as_test(testXcbWrapper) if (XCB_ICCCM_FOUND) - add_executable( testXcbSizeHints test_xcb_size_hints.cpp ) + add_executable(testXcbSizeHints test_xcb_size_hints.cpp) set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") - target_link_libraries( testXcbSizeHints - Qt5::Test - Qt5::X11Extras - Qt5::Widgets - KF5::ConfigCore - KF5::WindowSystem - XCB::XCB - XCB::ICCCM + target_link_libraries(testXcbSizeHints + KF5::ConfigCore + KF5::WindowSystem + Qt5::Test + Qt5::Widgets + Qt5::X11Extras + XCB::ICCCM + XCB::XCB ) add_test(NAME kwin-testXcbSizeHints COMMAND testXcbSizeHints) ecm_mark_as_test(testXcbSizeHints) endif() ######################################################## # Test XcbWindow ######################################################## -set( testXcbWindow_SRCS - test_xcb_window.cpp +set(testXcbWindow_SRCS + test_xcb_window.cpp ) -add_executable( testXcbWindow ${testXcbWindow_SRCS} ) - -target_link_libraries( testXcbWindow - Qt5::Test - Qt5::X11Extras - Qt5::Widgets - KF5::ConfigCore - KF5::WindowSystem - XCB::XCB +add_executable(testXcbWindow ${testXcbWindow_SRCS}) + +target_link_libraries(testXcbWindow + KF5::ConfigCore + KF5::WindowSystem + Qt5::Test + Qt5::Widgets + Qt5::X11Extras + XCB::XCB ) add_test(NAME kwin-testXcbWindow COMMAND testXcbWindow) ecm_mark_as_test(testXcbWindow) ######################################################## # Test BuiltInEffectLoader ######################################################## -set( testBuiltInEffectLoader_SRCS - test_builtin_effectloader.cpp - mock_effectshandler.cpp +set(testBuiltInEffectLoader_SRCS ../effectloader.cpp + mock_effectshandler.cpp + test_builtin_effectloader.cpp ) -add_executable( testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS}) +add_executable(testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS}) set_target_properties(testBuiltInEffectLoader PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testBuiltInEffectLoader + KF5::Package Qt5::Concurrent Qt5::Test Qt5::X11Extras - KF5::Package - kwineffects kwin4_effect_builtins + kwineffects ) add_test(NAME kwin-testBuiltInEffectLoader COMMAND testBuiltInEffectLoader) ecm_mark_as_test(testBuiltInEffectLoader) ######################################################## # Test ScriptedEffectLoader ######################################################## include_directories(${KWIN_SOURCE_DIR}) -set( testScriptedEffectLoader_SRCS - test_scripted_effectloader.cpp +set(testScriptedEffectLoader_SRCS + ../effectloader.cpp + ../orientation_sensor.cpp + ../screens.cpp + ../scripting/scriptedeffect.cpp + ../scripting/scripting_logging.cpp + ../scripting/scriptingutils.cpp mock_abstract_client.cpp mock_effectshandler.cpp mock_screens.cpp mock_workspace.cpp - ../effectloader.cpp - ../scripting/scriptedeffect.cpp - ../scripting/scriptingutils.cpp - ../scripting/scripting_logging.cpp - ../screens.cpp - ../orientation_sensor.cpp + test_scripted_effectloader.cpp ) kconfig_add_kcfg_files(testScriptedEffectLoader_SRCS ../settings.kcfgc) -qt5_add_dbus_adaptor( testScriptedEffectLoader_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) -add_executable( testScriptedEffectLoader ${testScriptedEffectLoader_SRCS}) +qt5_add_dbus_adaptor(testScriptedEffectLoader_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) +add_executable(testScriptedEffectLoader ${testScriptedEffectLoader_SRCS}) target_link_libraries(testScriptedEffectLoader + KF5::ConfigGui + KF5::GlobalAccel + KF5::I18n + KF5::Notifications + KF5::Package Qt5::Concurrent Qt5::Qml Qt5::Script Qt5::Sensors Qt5::Test Qt5::X11Extras - KF5::ConfigGui - KF5::GlobalAccel - KF5::I18n - KF5::Notifications - KF5::Package - kwineffects kwin4_effect_builtins + kwineffects ) add_test(NAME kwin-testScriptedEffectLoader COMMAND testScriptedEffectLoader) ecm_mark_as_test(testScriptedEffectLoader) ######################################################## # Test PluginEffectLoader ######################################################## -set( testPluginEffectLoader_SRCS - test_plugin_effectloader.cpp - mock_effectshandler.cpp +set(testPluginEffectLoader_SRCS ../effectloader.cpp + mock_effectshandler.cpp + test_plugin_effectloader.cpp ) -add_executable( testPluginEffectLoader ${testPluginEffectLoader_SRCS}) +add_executable(testPluginEffectLoader ${testPluginEffectLoader_SRCS}) target_link_libraries(testPluginEffectLoader + KF5::Package Qt5::Concurrent Qt5::Test Qt5::X11Extras - KF5::Package - kwineffects kwin4_effect_builtins + kwineffects ) add_test(NAME kwin-testPluginEffectLoader COMMAND testPluginEffectLoader) ecm_mark_as_test(testPluginEffectLoader) ######################################################## # FakeEffectPlugin ######################################################## add_library(fakeeffectplugin MODULE fakeeffectplugin.cpp) set_target_properties(fakeeffectplugin PROPERTIES PREFIX "") target_link_libraries(fakeeffectplugin kwineffects) ######################################################## # FakeEffectPlugin-Version ######################################################## add_library(effectversionplugin MODULE fakeeffectplugin_version.cpp) set_target_properties(effectversionplugin PROPERTIES PREFIX "") target_link_libraries(effectversionplugin kwineffects) ######################################################## # Test Screens ######################################################## -set( testScreens_SRCS - test_screens.cpp +set(testScreens_SRCS + ../orientation_sensor.cpp + ../screens.cpp + ../x11eventfilter.cpp mock_abstract_client.cpp mock_client.cpp mock_screens.cpp mock_workspace.cpp - ../screens.cpp - ../x11eventfilter.cpp - ../orientation_sensor.cpp + test_screens.cpp ) kconfig_add_kcfg_files(testScreens_SRCS ../settings.kcfgc) -qt5_add_dbus_adaptor( testScreens_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) +qt5_add_dbus_adaptor(testScreens_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) -add_executable( testScreens ${testScreens_SRCS}) +add_executable(testScreens ${testScreens_SRCS}) target_include_directories(testScreens BEFORE PRIVATE ./) target_link_libraries(testScreens - Qt5::DBus - Qt5::Sensors - Qt5::Test - Qt5::X11Extras - Qt5::Widgets KF5::ConfigCore KF5::ConfigGui KF5::I18n KF5::Notifications KF5::WindowSystem + Qt5::DBus + Qt5::Sensors + Qt5::Test + Qt5::Widgets + Qt5::X11Extras ) add_test(NAME kwin_testScreens COMMAND testScreens) ecm_mark_as_test(testScreens) ######################################################## # Test ScreenEdges ######################################################## -set( testScreenEdges_SRCS - test_screen_edges.cpp - mock_abstract_client.cpp - mock_client.cpp - mock_screens.cpp - mock_workspace.cpp +set(testScreenEdges_SRCS ../atoms.cpp ../gestures.cpp - ../screens.cpp + ../orientation_sensor.cpp + ../plugins/platforms/x11/standalone/edge.cpp ../screenedge.cpp + ../screens.cpp ../virtualdesktops.cpp ../xcbutils.cpp # init of extensions - ../plugins/platforms/x11/standalone/edge.cpp - ../orientation_sensor.cpp + mock_abstract_client.cpp + mock_client.cpp + mock_screens.cpp + mock_workspace.cpp + test_screen_edges.cpp ) kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc) -qt5_add_dbus_interface( testScreenEdges_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) -qt5_add_dbus_adaptor( testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) +qt5_add_dbus_interface(testScreenEdges_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) +qt5_add_dbus_adaptor(testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) -add_executable( testScreenEdges ${testScreenEdges_SRCS}) +add_executable(testScreenEdges ${testScreenEdges_SRCS}) set_target_properties(testScreenEdges PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_include_directories(testScreenEdges BEFORE PRIVATE ./) target_link_libraries(testScreenEdges - Qt5::DBus - Qt5::Sensors - Qt5::Test - Qt5::X11Extras KF5::ConfigCore KF5::ConfigGui - KF5::I18n KF5::GlobalAccel + KF5::I18n KF5::Notifications - KF5::WindowSystem KF5::WaylandServer - XCB::XCB - XCB::RANDR - XCB::XFIXES - XCB::SYNC + KF5::WindowSystem + Qt5::DBus + Qt5::Sensors + Qt5::Test + Qt5::X11Extras XCB::COMPOSITE XCB::DAMAGE XCB::GLX + XCB::RANDR XCB::SHM + XCB::SYNC + XCB::XCB + XCB::XFIXES ) add_test(NAME kwin_testScreenEdges COMMAND testScreenEdges) ecm_mark_as_test(testScreenEdges) ######################################################## # Test OnScreenNotification ######################################################## -set( testOnScreenNotification_SRCS - onscreennotificationtest.cpp - ../onscreennotification.cpp +set(testOnScreenNotification_SRCS ../input_event_spy.cpp + ../onscreennotification.cpp + onscreennotificationtest.cpp ) -add_executable( testOnScreenNotification ${testOnScreenNotification_SRCS}) +add_executable(testOnScreenNotification ${testOnScreenNotification_SRCS}) target_link_libraries(testOnScreenNotification + KF5::ConfigCore + Qt5::DBus + Qt5::Quick Qt5::Test Qt5::Widgets # QAction include - Qt5::Quick - Qt5::DBus - KF5::ConfigCore ) add_test(NAME kwin-testOnScreenNotification COMMAND testOnScreenNotification) ecm_mark_as_test(testOnScreenNotification) ######################################################## # Test Gestures ######################################################## -set( testGestures_SRCS - test_gestures.cpp +set(testGestures_SRCS ../gestures.cpp + test_gestures.cpp ) -add_executable( testGestures ${testGestures_SRCS}) +add_executable(testGestures ${testGestures_SRCS}) target_link_libraries(testGestures Qt5::Test ) add_test(NAME kwin-testGestures COMMAND testGestures) ecm_mark_as_test(testGestures) ######################################################## # Test X11 TimestampUpdate ######################################################## add_executable(testX11TimestampUpdate test_x11_timestamp_update.cpp) target_link_libraries(testX11TimestampUpdate - Qt5::Test KF5::CoreAddons + Qt5::Test kwin ) add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate) ecm_mark_as_test(testX11TimestampUpdate) set(testOpenGLContextAttributeBuilder_SRCS - opengl_context_attribute_builder_test.cpp ../abstract_opengl_context_attribute_builder.cpp ../egl_context_attribute_builder.cpp + opengl_context_attribute_builder_test.cpp ) -if(HAVE_EPOXY_GLX) +if (HAVE_EPOXY_GLX) set(testOpenGLContextAttributeBuilder_SRCS ${testOpenGLContextAttributeBuilder_SRCS} ../plugins/platforms/x11/standalone/glx_context_attribute_builder.cpp) endif() add_executable(testOpenGLContextAttributeBuilder ${testOpenGLContextAttributeBuilder_SRCS}) target_link_libraries(testOpenGLContextAttributeBuilder Qt5::Test) add_test(NAME kwin-testOpenGLContextAttributeBuilder COMMAND testOpenGLContextAttributeBuilder) ecm_mark_as_test(testOpenGLContextAttributeBuilder) set(testXkb_SRCS - test_xkb.cpp ../xkb.cpp + test_xkb.cpp ) add_executable(testXkb ${testXkb_SRCS}) target_link_libraries(testXkb - Qt5::Test - Qt5::Gui - Qt5::Widgets KF5::ConfigCore - KF5::WindowSystem KF5::WaylandServer + KF5::WindowSystem + Qt5::Gui + Qt5::Test + Qt5::Widgets XKB::XKB ) add_test(NAME kwin-testXkb COMMAND testXkb) ecm_mark_as_test(testXkb) -if(HAVE_GBM) +if (HAVE_GBM) add_executable(testGbmSurface test_gbm_surface.cpp ../plugins/platforms/drm/gbm_surface.cpp) target_link_libraries(testGbmSurface Qt5::Test) add_test(NAME kwin-testGbmSurface COMMAND testGbmSurface) ecm_mark_as_test(testGbmSurface) endif() add_executable(testVirtualKeyboardDBus test_virtualkeyboard_dbus.cpp ../virtualkeyboard_dbus.cpp) target_link_libraries(testVirtualKeyboardDBus - Qt5::Test Qt5::DBus + Qt5::Test ) add_test(NAME kwin-testVirtualKeyboardDBus COMMAND testVirtualKeyboardDBus) ecm_mark_as_test(testVirtualKeyboardDBus) - diff --git a/autotests/libinput/CMakeLists.txt b/autotests/libinput/CMakeLists.txt index b34db02de..8caa4bb07 100644 --- a/autotests/libinput/CMakeLists.txt +++ b/autotests/libinput/CMakeLists.txt @@ -1,113 +1,113 @@ include_directories(${Libinput_INCLUDE_DIRS}) include_directories(${UDEV_INCLUDE_DIR}) ######################################################## # Test Devices ######################################################## -set( testLibinputDevice_SRCS device_test.cpp mock_libinput.cpp ../../libinput/device.cpp ) +set(testLibinputDevice_SRCS device_test.cpp mock_libinput.cpp ../../libinput/device.cpp ) add_executable(testLibinputDevice ${testLibinputDevice_SRCS}) -target_link_libraries( testLibinputDevice Qt5::Test Qt5::DBus Qt5::Gui KF5::ConfigCore) +target_link_libraries(testLibinputDevice Qt5::Test Qt5::DBus Qt5::Gui KF5::ConfigCore) add_test(NAME kwin-testLibinputDevice COMMAND testLibinputDevice) ecm_mark_as_test(testLibinputDevice) ######################################################## # Test Key Event ######################################################## -set( testLibinputKeyEvent_SRCS - key_event_test.cpp - mock_libinput.cpp - ../../libinput/device.cpp - ../../libinput/events.cpp - ) +set(testLibinputKeyEvent_SRCS + ../../libinput/device.cpp + ../../libinput/events.cpp + key_event_test.cpp + mock_libinput.cpp +) add_executable(testLibinputKeyEvent ${testLibinputKeyEvent_SRCS}) -target_link_libraries( testLibinputKeyEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) +target_link_libraries(testLibinputKeyEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testLibinputKeyEvent COMMAND testLibinputKeyEvent) ecm_mark_as_test(testLibinputKeyEvent) ######################################################## # Test Pointer Event ######################################################## -set( testLibinputPointerEvent_SRCS - pointer_event_test.cpp - mock_libinput.cpp - ../../libinput/device.cpp - ../../libinput/events.cpp - ) +set(testLibinputPointerEvent_SRCS + ../../libinput/device.cpp + ../../libinput/events.cpp + mock_libinput.cpp + pointer_event_test.cpp +) add_executable(testLibinputPointerEvent ${testLibinputPointerEvent_SRCS}) -target_link_libraries( testLibinputPointerEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) +target_link_libraries(testLibinputPointerEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testLibinputPointerEvent COMMAND testLibinputPointerEvent) ecm_mark_as_test(testLibinputPointerEvent) ######################################################## # Test Touch Event ######################################################## -set( testLibinputTouchEvent_SRCS - touch_event_test.cpp - mock_libinput.cpp - ../../libinput/device.cpp - ../../libinput/events.cpp - ) +set(testLibinputTouchEvent_SRCS + ../../libinput/device.cpp + ../../libinput/events.cpp + mock_libinput.cpp + touch_event_test.cpp +) add_executable(testLibinputTouchEvent ${testLibinputTouchEvent_SRCS}) -target_link_libraries( testLibinputTouchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) +target_link_libraries(testLibinputTouchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testLibinputTouchEvent COMMAND testLibinputTouchEvent) ecm_mark_as_test(testLibinputTouchEvent) ######################################################## # Test Gesture Event ######################################################## -set( testLibinputGestureEvent_SRCS - gesture_event_test.cpp - mock_libinput.cpp - ../../libinput/device.cpp - ../../libinput/events.cpp - ) +set(testLibinputGestureEvent_SRCS + ../../libinput/device.cpp + ../../libinput/events.cpp + gesture_event_test.cpp + mock_libinput.cpp +) add_executable(testLibinputGestureEvent ${testLibinputGestureEvent_SRCS}) -target_link_libraries( testLibinputGestureEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) +target_link_libraries(testLibinputGestureEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testLibinputGestureEvent COMMAND testLibinputGestureEvent) ecm_mark_as_test(testLibinputGestureEvent) ######################################################## # Test Switch Event ######################################################## -set( testLibinputSwitchEvent_SRCS - switch_event_test.cpp - mock_libinput.cpp +set(testLibinputSwitchEvent_SRCS ../../libinput/device.cpp ../../libinput/events.cpp - ) + mock_libinput.cpp + switch_event_test.cpp +) add_executable(testLibinputSwitchEvent ${testLibinputSwitchEvent_SRCS}) target_link_libraries(testLibinputSwitchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testLibinputSwitchEvent COMMAND testLibinputSwitchEvent) ecm_mark_as_test(testLibinputSwitchEvent) ######################################################## # Test Context ######################################################## -set( testLibinputContext_SRCS - context_test.cpp - mock_libinput.cpp - mock_udev.cpp +set(testLibinputContext_SRCS ../../libinput/context.cpp ../../libinput/device.cpp ../../libinput/events.cpp ../../libinput/libinput_logging.cpp ../../logind.cpp - ) + context_test.cpp + mock_libinput.cpp + mock_udev.cpp +) add_executable(testLibinputContext ${testLibinputContext_SRCS}) -target_link_libraries( testLibinputContext +target_link_libraries(testLibinputContext + KF5::ConfigCore + KF5::WindowSystem Qt5::DBus Qt5::Test Qt5::Widgets - KF5::ConfigCore - KF5::WindowSystem - ) +) add_test(NAME kwin-testLibinputContext COMMAND testLibinputContext) ecm_mark_as_test(testLibinputContext) ######################################################## # Test Input Events ######################################################## -set( testInputEvents_SRCS input_event_test.cpp mock_libinput.cpp ../../libinput/device.cpp ../../input_event.cpp ) +set(testInputEvents_SRCS input_event_test.cpp mock_libinput.cpp ../../libinput/device.cpp ../../input_event.cpp) add_executable(testInputEvents ${testInputEvents_SRCS}) -target_link_libraries( testInputEvents Qt5::Test Qt5::DBus Qt5::Gui Qt5::Widgets KF5::ConfigCore) +target_link_libraries(testInputEvents Qt5::Test Qt5::DBus Qt5::Gui Qt5::Widgets KF5::ConfigCore) add_test(NAME kwin-testInputEvents COMMAND testInputEvents) ecm_mark_as_test(testInputEvents) diff --git a/autotests/libxrenderutils/CMakeLists.txt b/autotests/libxrenderutils/CMakeLists.txt index 062dc186d..ceefcc2f6 100644 --- a/autotests/libxrenderutils/CMakeLists.txt +++ b/autotests/libxrenderutils/CMakeLists.txt @@ -1,13 +1,13 @@ add_executable(blendPictureTest blendpicture_test.cpp) set_target_properties(blendPictureTest PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") add_test(NAME xrenderutils-blendPictureTest COMMAND blendPictureTest) target_link_libraries(blendPictureTest kwinxrenderutils Qt5::Test Qt5::Gui Qt5::X11Extras XCB::XCB XCB::RENDER XCB::XFIXES - ) +) ecm_mark_as_test(blendPictureTest) diff --git a/autotests/tabbox/CMakeLists.txt b/autotests/tabbox/CMakeLists.txt index 7130d7050..6657b957c 100644 --- a/autotests/tabbox/CMakeLists.txt +++ b/autotests/tabbox/CMakeLists.txt @@ -1,96 +1,96 @@ include_directories(${KWIN_SOURCE_DIR}) add_definitions(-DKWIN_UNIT_TEST) ######################################################## # Test TabBox::ClientModel ######################################################## -set( testTabBoxClientModel_SRCS - ../../tabbox/clientmodel.cpp - ../../tabbox/desktopmodel.cpp - ../../tabbox/tabboxconfig.cpp - ../../tabbox/tabboxhandler.cpp - ../../tabbox/tabbox_logging.cpp - test_tabbox_clientmodel.cpp - mock_tabboxhandler.cpp - mock_tabboxclient.cpp +set(testTabBoxClientModel_SRCS + ../../tabbox/clientmodel.cpp + ../../tabbox/desktopmodel.cpp + ../../tabbox/tabbox_logging.cpp + ../../tabbox/tabboxconfig.cpp + ../../tabbox/tabboxhandler.cpp + mock_tabboxclient.cpp + mock_tabboxhandler.cpp + test_tabbox_clientmodel.cpp ) -add_executable( testTabBoxClientModel ${testTabBoxClientModel_SRCS} ) +add_executable(testTabBoxClientModel ${testTabBoxClientModel_SRCS}) set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") -target_link_libraries( testTabBoxClientModel - Qt5::Core - Qt5::Widgets - Qt5::Script - Qt5::Quick - Qt5::Test - Qt5::DBus - Qt5::X11Extras +target_link_libraries(testTabBoxClientModel KF5::ConfigCore KF5::I18n KF5::Package KF5::WindowSystem + Qt5::Core + Qt5::DBus + Qt5::Quick + Qt5::Script + Qt5::Test + Qt5::Widgets + Qt5::X11Extras XCB::XCB ) add_test(NAME kwin-testTabBoxClientModel COMMAND testTabBoxClientModel) ecm_mark_as_test(testTabBoxClientModel) ######################################################## # Test TabBox::TabBoxHandler ######################################################## -set( testTabBoxHandler_SRCS - ../../tabbox/clientmodel.cpp - ../../tabbox/desktopmodel.cpp - ../../tabbox/tabboxconfig.cpp - ../../tabbox/tabboxhandler.cpp - ../../tabbox/tabbox_logging.cpp - test_tabbox_handler.cpp - mock_tabboxhandler.cpp - mock_tabboxclient.cpp +set(testTabBoxHandler_SRCS + ../../tabbox/clientmodel.cpp + ../../tabbox/desktopmodel.cpp + ../../tabbox/tabbox_logging.cpp + ../../tabbox/tabboxconfig.cpp + ../../tabbox/tabboxhandler.cpp + mock_tabboxclient.cpp + mock_tabboxhandler.cpp + test_tabbox_handler.cpp ) -add_executable( testTabBoxHandler ${testTabBoxHandler_SRCS} ) +add_executable(testTabBoxHandler ${testTabBoxHandler_SRCS}) set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") -target_link_libraries( testTabBoxHandler - Qt5::Core - Qt5::Widgets - Qt5::Script - Qt5::Quick - Qt5::Test - Qt5::DBus - Qt5::X11Extras +target_link_libraries(testTabBoxHandler KF5::ConfigCore KF5::I18n KF5::Package KF5::WindowSystem + Qt5::Core + Qt5::DBus + Qt5::Quick + Qt5::Script + Qt5::Test + Qt5::Widgets + Qt5::X11Extras XCB::XCB ) add_test(NAME kwin-testTabBoxHandler COMMAND testTabBoxHandler) ecm_mark_as_test(testTabBoxHandler) ######################################################## # Test TabBox::TabBoxConfig ######################################################## -set( testTabBoxConfig_SRCS - ../../tabbox/tabboxconfig.cpp +set(testTabBoxConfig_SRCS ../../tabbox/tabbox_logging.cpp + ../../tabbox/tabboxconfig.cpp test_tabbox_config.cpp ) -add_executable( testTabBoxConfig ${testTabBoxConfig_SRCS} ) -target_link_libraries( testTabBoxConfig Qt5::Core Qt5::Test ) +add_executable(testTabBoxConfig ${testTabBoxConfig_SRCS}) +target_link_libraries(testTabBoxConfig Qt5::Core Qt5::Test) add_test(NAME kwin-testTabBoxConfig COMMAND testTabBoxConfig) ecm_mark_as_test(testTabBoxConfig) ######################################################## # Test TabBox::DesktopChainManager ######################################################## -set( testDesktopChain_SRCS +set(testDesktopChain_SRCS ../../tabbox/desktopchain.cpp ../../tabbox/tabbox_logging.cpp test_desktopchain.cpp ) -add_executable( testDesktopChain ${testDesktopChain_SRCS} ) -target_link_libraries( testDesktopChain Qt5::Core Qt5::Test ) +add_executable(testDesktopChain ${testDesktopChain_SRCS}) +target_link_libraries(testDesktopChain Qt5::Core Qt5::Test) add_test(NAME kwin-testDesktopChain COMMAND testDesktopChain) ecm_mark_as_test(testDesktopChain) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 7de5ca41d..77148b94c 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,13 +1,14 @@ add_subdirectory(icons) ########### next target ############### -add_executable( kwin5_update_default_rules update_default_rules.cpp) - -target_link_libraries( kwin5_update_default_rules Qt5::Core Qt5::DBus KF5::ConfigCore ) - -install(TARGETS kwin5_update_default_rules DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/ ) +add_executable(kwin5_update_default_rules update_default_rules.cpp) +target_link_libraries(kwin5_update_default_rules + KF5::ConfigCore + Qt5::Core + Qt5::DBus +) +install(TARGETS kwin5_update_default_rules DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/) ########### install files ############### -install(FILES org_kde_kwin.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) - +install(FILES org_kde_kwin.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 64d314984..5ebaf47a7 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -1,201 +1,206 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kwin_effects\" -DEFFECT_BUILTINS) include_directories(${KWIN_SOURCE_DIR}) # for xcbutils.h set(kwin_effect_OWN_LIBS kwineffects ) -if( KWIN_HAVE_XRENDER_COMPOSITING ) +if (KWIN_HAVE_XRENDER_COMPOSITING) set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinxrenderutils) endif() set(kwin_effect_KDE_LIBS KF5::ConfigGui KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n - KF5::WindowSystem - KF5::Plasma # screenedge effect KF5::IconThemes - KF5::Service KF5::Notifications # screenshot effect + KF5::Plasma # screenedge effect + KF5::Service + KF5::WindowSystem ) set(kwin_effect_QT_LIBS Qt5::Concurrent Qt5::DBus Qt5::Quick Qt5::X11Extras ) set(kwin_effect_XLIB_LIBS ${X11_X11_LIB} ) set(kwin_effect_XCB_LIBS - XCB::XCB XCB::IMAGE + XCB::XCB XCB::XFIXES ) -if( KWIN_HAVE_XRENDER_COMPOSITING ) +if (KWIN_HAVE_XRENDER_COMPOSITING) set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} XCB::RENDER) endif() set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglutils) -macro( KWIN4_ADD_EFFECT_BACKEND name ) - add_library( ${name} SHARED ${ARGN} ) - target_link_libraries( ${name} PRIVATE ${kwin_effect_OWN_LIBS} ${kwin_effect_KDE_LIBS} ${kwin_effect_QT_LIBS} ${kwin_effect_XLIB_LIBS} ${kwin_effect_XCB_LIBS}) +macro(KWIN4_ADD_EFFECT_BACKEND name) + add_library(${name} SHARED ${ARGN}) + 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} + ) endmacro() # Adds effect plugin with given name. Sources are given after the name -macro( KWIN4_ADD_EFFECT name ) +macro(KWIN4_ADD_EFFECT name) kwin4_add_effect_backend(kwin4_effect_${name} ${ARGN}) - set_target_properties(kwin4_effect_${name} PROPERTIES VERSION 1.0.0 SOVERSION 1 ) + set_target_properties(kwin4_effect_${name} PROPERTIES VERSION 1.0.0 SOVERSION 1) set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name}) - install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS} ) - + install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS}) endmacro() # Install the KWin/Effect service type -install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +install(FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) # Create initial variables -set( kwin4_effect_include_directories ) +set(kwin4_effect_include_directories) -set( kwin4_effect_builtins_sources - logging.cpp - effect_builtins.cpp +set(kwin4_effect_builtins_sources blur/blur.cpp blur/blurshader.cpp colorpicker/colorpicker.cpp + coverswitch/coverswitch.cpp cube/cube.cpp cube/cube_proxy.cpp cubeslide/cubeslide.cpp - coverswitch/coverswitch.cpp desktopgrid/desktopgrid.cpp diminactive/diminactive.cpp + effect_builtins.cpp flipswitch/flipswitch.cpp glide/glide.cpp invert/invert.cpp + logging.cpp lookingglass/lookingglass.cpp magiclamp/magiclamp.cpp magnifier/magnifier.cpp mouseclick/mouseclick.cpp mousemark/mousemark.cpp presentwindows/presentwindows.cpp presentwindows/presentwindows_proxy.cpp resize/resize.cpp showfps/showfps.cpp showpaint/showpaint.cpp slide/slide.cpp thumbnailaside/thumbnailaside.cpp touchpoints/touchpoints.cpp trackmouse/trackmouse.cpp windowgeometry/windowgeometry.cpp wobblywindows/wobblywindows.cpp zoom/zoom.cpp - ) +) -qt5_add_resources( kwin4_effect_builtins_sources shaders.qrc ) +qt5_add_resources(kwin4_effect_builtins_sources shaders.qrc) kconfig_add_kcfg_files(kwin4_effect_builtins_sources blur/blurconfig.kcfgc + coverswitch/coverswitchconfig.kcfgc cube/cubeconfig.kcfgc cubeslide/cubeslideconfig.kcfgc - coverswitch/coverswitchconfig.kcfgc desktopgrid/desktopgridconfig.kcfgc diminactive/diminactiveconfig.kcfgc fallapart/fallapartconfig.kcfgc flipswitch/flipswitchconfig.kcfgc glide/glideconfig.kcfgc lookingglass/lookingglassconfig.kcfgc magiclamp/magiclampconfig.kcfgc magnifier/magnifierconfig.kcfgc mouseclick/mouseclickconfig.kcfgc mousemark/mousemarkconfig.kcfgc presentwindows/presentwindowsconfig.kcfgc resize/resizeconfig.kcfgc showfps/showfpsconfig.kcfgc slide/slideconfig.kcfgc slidingpopups/slidingpopupsconfig.kcfgc thumbnailaside/thumbnailasideconfig.kcfgc trackmouse/trackmouseconfig.kcfgc windowgeometry/windowgeometryconfig.kcfgc wobblywindows/wobblywindowsconfig.kcfgc zoom/zoomconfig.kcfgc - ) +) # scripted effects 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) 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) ############################################################################### # Built-in effects go here # Common effects -add_subdirectory( desktopgrid ) -add_subdirectory( diminactive ) -include( fallapart/CMakeLists.txt ) -include( highlightwindow/CMakeLists.txt ) -include( kscreen/CMakeLists.txt ) -add_subdirectory( magiclamp ) -add_subdirectory( presentwindows ) -add_subdirectory( resize ) -include( screenedge/CMakeLists.txt ) -add_subdirectory( showfps ) -add_subdirectory( showpaint ) -add_subdirectory( slide ) -include( slideback/CMakeLists.txt ) -include( slidingpopups/CMakeLists.txt ) -add_subdirectory( thumbnailaside ) -add_subdirectory( windowgeometry ) -add_subdirectory( zoom ) +add_subdirectory(desktopgrid) +add_subdirectory(diminactive) +include(fallapart/CMakeLists.txt) +include(highlightwindow/CMakeLists.txt) +include(kscreen/CMakeLists.txt) +add_subdirectory(magiclamp) +add_subdirectory(presentwindows) +add_subdirectory(resize) +include(screenedge/CMakeLists.txt) +add_subdirectory(showfps) +add_subdirectory(showpaint) +add_subdirectory(slide) +include(slideback/CMakeLists.txt) +include(slidingpopups/CMakeLists.txt) +add_subdirectory(thumbnailaside) +add_subdirectory(windowgeometry) +add_subdirectory(zoom) # OpenGL-specific effects -add_subdirectory( blur ) -include( backgroundcontrast/CMakeLists.txt ) -add_subdirectory( coverswitch ) -add_subdirectory( cube ) -add_subdirectory( cubeslide ) -add_subdirectory( flipswitch ) -add_subdirectory( glide ) -add_subdirectory( invert ) -add_subdirectory( lookingglass ) -add_subdirectory( magnifier ) -add_subdirectory( mouseclick ) -add_subdirectory( mousemark ) -include( screenshot/CMakeLists.txt ) -include( sheet/CMakeLists.txt ) -include( snaphelper/CMakeLists.txt ) -include( startupfeedback/CMakeLists.txt ) -add_subdirectory( trackmouse ) -add_subdirectory( wobblywindows ) +add_subdirectory(blur) +include(backgroundcontrast/CMakeLists.txt) +add_subdirectory(coverswitch) +add_subdirectory(cube) +add_subdirectory(cubeslide) +add_subdirectory(flipswitch) +add_subdirectory(glide) +add_subdirectory(invert) +add_subdirectory(lookingglass) +add_subdirectory(magnifier) +add_subdirectory(mouseclick) +add_subdirectory(mousemark) +include(screenshot/CMakeLists.txt) +include(sheet/CMakeLists.txt) +include(snaphelper/CMakeLists.txt) +include(startupfeedback/CMakeLists.txt) +add_subdirectory(trackmouse) +add_subdirectory(wobblywindows) ############################################################################### # Add the builtins plugin -kwin4_add_effect( builtins ${kwin4_effect_builtins_sources} ) +kwin4_add_effect(builtins ${kwin4_effect_builtins_sources}) diff --git a/effects/backgroundcontrast/CMakeLists.txt b/effects/backgroundcontrast/CMakeLists.txt index 44ffb6ce4..c6cbcf8a8 100644 --- a/effects/backgroundcontrast/CMakeLists.txt +++ b/effects/backgroundcontrast/CMakeLists.txt @@ -1,7 +1,8 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - backgroundcontrast/contrast.cpp - backgroundcontrast/contrastshader.cpp ) +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} + backgroundcontrast/contrast.cpp + backgroundcontrast/contrastshader.cpp +) diff --git a/effects/blur/CMakeLists.txt b/effects/blur/CMakeLists.txt index b4c99d32e..7a84e4ee5 100644 --- a/effects/blur/CMakeLists.txt +++ b/effects/blur/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_blur_config_SRCS blur_config.cpp) ki18n_wrap_ui(kwin_blur_config_SRCS blur_config.ui) qt5_add_dbus_interface(kwin_blur_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_blur_config_SRCS blurconfig.kcfgc) add_library(kwin_blur_config MODULE ${kwin_blur_config_SRCS}) target_link_libraries(kwin_blur_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_blur_config blur_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_blur_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/coverswitch/CMakeLists.txt b/effects/coverswitch/CMakeLists.txt index c1a6aed91..af789e8c9 100644 --- a/effects/coverswitch/CMakeLists.txt +++ b/effects/coverswitch/CMakeLists.txt @@ -1,27 +1,27 @@ ####################################### # Effect ####################################### # Config set(kwin_coverswitch_config_SRCS coverswitch_config.cpp) ki18n_wrap_ui(kwin_coverswitch_config_SRCS coverswitch_config.ui) qt5_add_dbus_interface(kwin_coverswitch_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_coverswitch_config_SRCS coverswitchconfig.kcfgc) add_library(kwin_coverswitch_config MODULE ${kwin_coverswitch_config_SRCS}) target_link_libraries(kwin_coverswitch_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_coverswitch_config coverswitch_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_coverswitch_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/cube/CMakeLists.txt b/effects/cube/CMakeLists.txt index ee9e52c90..ae06792b7 100644 --- a/effects/cube/CMakeLists.txt +++ b/effects/cube/CMakeLists.txt @@ -1,35 +1,33 @@ ####################################### # Effect # Data files -install( FILES - data/cubecap.png - DESTINATION ${DATA_INSTALL_DIR}/kwin ) +install(FILES data/cubecap.png DESTINATION ${DATA_INSTALL_DIR}/kwin) ####################################### # Config set(kwin_cube_config_SRCS cube_config.cpp) ki18n_wrap_ui(kwin_cube_config_SRCS cube_config.ui) qt5_add_dbus_interface(kwin_cube_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_cube_config_SRCS cubeconfig.kcfgc) add_library(kwin_cube_config MODULE ${kwin_cube_config_SRCS}) target_link_libraries(kwin_cube_config KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n KF5::XmlGui KF5::KIOWidgets KF5::Service ) kcoreaddons_desktop_to_json(kwin_cube_config cube_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_cube_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/cubeslide/CMakeLists.txt b/effects/cubeslide/CMakeLists.txt index 3d3a29fa7..8bb595121 100644 --- a/effects/cubeslide/CMakeLists.txt +++ b/effects/cubeslide/CMakeLists.txt @@ -1,25 +1,25 @@ ####################################### # Config set(kwin_cubeslide_config_SRCS cubeslide_config.cpp) ki18n_wrap_ui(kwin_cubeslide_config_SRCS cubeslide_config.ui) qt5_add_dbus_interface(kwin_cubeslide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_cubeslide_config_SRCS cubeslideconfig.kcfgc) add_library(kwin_cubeslide_config MODULE ${kwin_cubeslide_config_SRCS}) target_link_libraries(kwin_cubeslide_config - kwineffects KF5::ConfigWidgets KF5::I18n KF5::Service + kwineffects ) kcoreaddons_desktop_to_json(kwin_cubeslide_config cubeslide_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_cubeslide_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/desktopgrid/CMakeLists.txt b/effects/desktopgrid/CMakeLists.txt index 57df02ea3..151021ace 100644 --- a/effects/desktopgrid/CMakeLists.txt +++ b/effects/desktopgrid/CMakeLists.txt @@ -1,35 +1,32 @@ ####################################### # Effect -install( FILES - main.qml - DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/desktopgrid/ -) +install(FILES main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/desktopgrid/) ####################################### # Config set(kwin_desktopgrid_config_SRCS desktopgrid_config.cpp) ki18n_wrap_ui(kwin_desktopgrid_config_SRCS desktopgrid_config.ui) qt5_add_dbus_interface(kwin_desktopgrid_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_desktopgrid_config_SRCS desktopgridconfig.kcfgc) add_library(kwin_desktopgrid_config MODULE ${kwin_desktopgrid_config_SRCS}) target_link_libraries(kwin_desktopgrid_config - kwineffects - Qt5::Quick KF5::Completion KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n KF5::Service KF5::XmlGui + Qt5::Quick + kwineffects ) kcoreaddons_desktop_to_json(kwin_desktopgrid_config desktopgrid_config.desktop SERVICE_TYPES kcmodule.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_desktopgrid_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/diminactive/CMakeLists.txt b/effects/diminactive/CMakeLists.txt index f19f36a4d..dc9e46711 100644 --- a/effects/diminactive/CMakeLists.txt +++ b/effects/diminactive/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_diminactive_config_SRCS diminactive_config.cpp) ki18n_wrap_ui(kwin_diminactive_config_SRCS diminactive_config.ui) qt5_add_dbus_interface(kwin_diminactive_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_diminactive_config_SRCS diminactiveconfig.kcfgc) add_library(kwin_diminactive_config MODULE ${kwin_diminactive_config_SRCS}) target_link_libraries(kwin_diminactive_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_diminactive_config diminactive_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_diminactive_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/fallapart/CMakeLists.txt b/effects/fallapart/CMakeLists.txt index 7f1d43e71..00ff7c854 100644 --- a/effects/fallapart/CMakeLists.txt +++ b/effects/fallapart/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} fallapart/fallapart.cpp - ) +) diff --git a/effects/glide/CMakeLists.txt b/effects/glide/CMakeLists.txt index 4ae578c71..9beb58782 100644 --- a/effects/glide/CMakeLists.txt +++ b/effects/glide/CMakeLists.txt @@ -1,25 +1,25 @@ ####################################### # Config set(kwin_glide_config_SRCS glide_config.cpp) ki18n_wrap_ui(kwin_glide_config_SRCS glide_config.ui) qt5_add_dbus_interface(kwin_glide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_glide_config_SRCS glideconfig.kcfgc) add_library(kwin_glide_config MODULE ${kwin_glide_config_SRCS}) target_link_libraries(kwin_glide_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_glide_config glide_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_glide_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/highlightwindow/CMakeLists.txt b/effects/highlightwindow/CMakeLists.txt index c459335bd..712c4a65b 100644 --- a/effects/highlightwindow/CMakeLists.txt +++ b/effects/highlightwindow/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} highlightwindow/highlightwindow.cpp - ) +) diff --git a/effects/kscreen/CMakeLists.txt b/effects/kscreen/CMakeLists.txt index 46e97f8c4..a6f865337 100644 --- a/effects/kscreen/CMakeLists.txt +++ b/effects/kscreen/CMakeLists.txt @@ -1,10 +1,10 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - kscreen/kscreen.cpp +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} + kscreen/kscreen.cpp ) kconfig_add_kcfg_files(kwin4_effect_builtins_sources kscreen/kscreenconfig.kcfgc) diff --git a/effects/magiclamp/CMakeLists.txt b/effects/magiclamp/CMakeLists.txt index c1dc01158..073546bf2 100644 --- a/effects/magiclamp/CMakeLists.txt +++ b/effects/magiclamp/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_magiclamp_config_SRCS magiclamp_config.cpp) ki18n_wrap_ui(kwin_magiclamp_config_SRCS magiclamp_config.ui) qt5_add_dbus_interface(kwin_magiclamp_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_magiclamp_config_SRCS magiclampconfig.kcfgc) add_library(kwin_magiclamp_config MODULE ${kwin_magiclamp_config_SRCS}) target_link_libraries(kwin_magiclamp_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_magiclamp_config magiclamp_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_magiclamp_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/presentwindows/CMakeLists.txt b/effects/presentwindows/CMakeLists.txt index b49d3138e..c513fad88 100644 --- a/effects/presentwindows/CMakeLists.txt +++ b/effects/presentwindows/CMakeLists.txt @@ -1,33 +1,30 @@ ####################################### # Effect -install( FILES - main.qml - DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows/ -) +install(FILES main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows/) ####################################### # Config set(kwin_presentwindows_config_SRCS presentwindows_config.cpp) ki18n_wrap_ui(kwin_presentwindows_config_SRCS presentwindows_config.ui) qt5_add_dbus_interface(kwin_presentwindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_presentwindows_config_SRCS presentwindowsconfig.kcfgc) add_library(kwin_presentwindows_config MODULE ${kwin_presentwindows_config_SRCS}) target_link_libraries(kwin_presentwindows_config KF5::Completion KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n KF5::Service KF5::XmlGui ) kcoreaddons_desktop_to_json(kwin_presentwindows_config presentwindows_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_presentwindows_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/resize/CMakeLists.txt b/effects/resize/CMakeLists.txt index 763f2dae3..b6b77ed57 100644 --- a/effects/resize/CMakeLists.txt +++ b/effects/resize/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_resize_config_SRCS resize_config.cpp) ki18n_wrap_ui(kwin_resize_config_SRCS resize_config.ui) qt5_add_dbus_interface(kwin_resize_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_resize_config_SRCS resizeconfig.kcfgc) add_library(kwin_resize_config MODULE ${kwin_resize_config_SRCS}) target_link_libraries(kwin_resize_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_resize_config resize_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_resize_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/screenedge/CMakeLists.txt b/effects/screenedge/CMakeLists.txt index fb1240e43..3504971fb 100644 --- a/effects/screenedge/CMakeLists.txt +++ b/effects/screenedge/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} screenedge/screenedgeeffect.cpp - ) +) diff --git a/effects/screenshot/CMakeLists.txt b/effects/screenshot/CMakeLists.txt index ddf46df3c..c0f6d4a22 100644 --- a/effects/screenshot/CMakeLists.txt +++ b/effects/screenshot/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} screenshot/screenshot.cpp - ) +) diff --git a/effects/sheet/CMakeLists.txt b/effects/sheet/CMakeLists.txt index ffd0a8b6c..fc680bc0a 100644 --- a/effects/sheet/CMakeLists.txt +++ b/effects/sheet/CMakeLists.txt @@ -1,8 +1,8 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} sheet/sheet.cpp - ) +) kconfig_add_kcfg_files(kwin4_effect_builtins_sources sheet/sheetconfig.kcfgc) diff --git a/effects/showfps/CMakeLists.txt b/effects/showfps/CMakeLists.txt index 564c4e7d4..3bdb7d24c 100644 --- a/effects/showfps/CMakeLists.txt +++ b/effects/showfps/CMakeLists.txt @@ -1,25 +1,25 @@ ####################################### # Config set(kwin_showfps_config_SRCS showfps_config.cpp) ki18n_wrap_ui(kwin_showfps_config_SRCS showfps_config.ui) qt5_add_dbus_interface(kwin_showfps_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_showfps_config_SRCS showfpsconfig.kcfgc) add_library(kwin_showfps_config MODULE ${kwin_showfps_config_SRCS}) target_link_libraries(kwin_showfps_config - Qt5::DBus KF5::Completion KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_showfps_config showfps_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_showfps_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/slide/CMakeLists.txt b/effects/slide/CMakeLists.txt index fa35bef2a..2a974cd9d 100644 --- a/effects/slide/CMakeLists.txt +++ b/effects/slide/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_slide_config_SRCS slide_config.cpp) ki18n_wrap_ui(kwin_slide_config_SRCS slide_config.ui) qt5_add_dbus_interface(kwin_slide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_slide_config_SRCS slideconfig.kcfgc) add_library(kwin_slide_config MODULE ${kwin_slide_config_SRCS}) target_link_libraries(kwin_slide_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_slide_config slide_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_slide_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/slideback/CMakeLists.txt b/effects/slideback/CMakeLists.txt index 1564954f4..aa865fb5c 100644 --- a/effects/slideback/CMakeLists.txt +++ b/effects/slideback/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} slideback/slideback.cpp - ) +) diff --git a/effects/slidingpopups/CMakeLists.txt b/effects/slidingpopups/CMakeLists.txt index b3de9b598..79246695b 100644 --- a/effects/slidingpopups/CMakeLists.txt +++ b/effects/slidingpopups/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} slidingpopups/slidingpopups.cpp - ) +) diff --git a/effects/snaphelper/CMakeLists.txt b/effects/snaphelper/CMakeLists.txt index 6b7b98094..73172eb30 100644 --- a/effects/snaphelper/CMakeLists.txt +++ b/effects/snaphelper/CMakeLists.txt @@ -1,7 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} snaphelper/snaphelper.cpp - ) +) diff --git a/effects/startupfeedback/CMakeLists.txt b/effects/startupfeedback/CMakeLists.txt index 19a37836f..da311aa6e 100644 --- a/effects/startupfeedback/CMakeLists.txt +++ b/effects/startupfeedback/CMakeLists.txt @@ -1,10 +1,7 @@ ####################################### # Effect # Source files -set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} +set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} startupfeedback/startupfeedback.cpp - ) - -####################################### -# Config +) diff --git a/effects/trackmouse/CMakeLists.txt b/effects/trackmouse/CMakeLists.txt index 471b9ab4d..19bad9f87 100644 --- a/effects/trackmouse/CMakeLists.txt +++ b/effects/trackmouse/CMakeLists.txt @@ -1,33 +1,30 @@ ####################################### # Effect # Data files -install( FILES - data/tm_inner.png - data/tm_outer.png - DESTINATION ${DATA_INSTALL_DIR}/kwin ) +install(FILES data/tm_inner.png data/tm_outer.png DESTINATION ${DATA_INSTALL_DIR}/kwin) ####################################### # Config set(kwin_trackmouse_config_SRCS trackmouse_config.cpp) ki18n_wrap_ui(kwin_trackmouse_config_SRCS trackmouse_config.ui) qt5_add_dbus_interface(kwin_trackmouse_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_trackmouse_config_SRCS trackmouseconfig.kcfgc) add_library(kwin_trackmouse_config MODULE ${kwin_trackmouse_config_SRCS}) target_link_libraries(kwin_trackmouse_config KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n KF5::Service KF5::XmlGui ) kcoreaddons_desktop_to_json(kwin_trackmouse_config trackmouse_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_trackmouse_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/effects/wobblywindows/CMakeLists.txt b/effects/wobblywindows/CMakeLists.txt index 6d9d4acdd..f3e78392d 100644 --- a/effects/wobblywindows/CMakeLists.txt +++ b/effects/wobblywindows/CMakeLists.txt @@ -1,24 +1,24 @@ ####################################### # Config set(kwin_wobblywindows_config_SRCS wobblywindows_config.cpp) ki18n_wrap_ui(kwin_wobblywindows_config_SRCS wobblywindows_config.ui) qt5_add_dbus_interface(kwin_wobblywindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_wobblywindows_config_SRCS wobblywindowsconfig.kcfgc) add_library(kwin_wobblywindows_config MODULE ${kwin_wobblywindows_config_SRCS}) target_link_libraries(kwin_wobblywindows_config - Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service + Qt5::DBus ) kcoreaddons_desktop_to_json(kwin_wobblywindows_config wobblywindows_config.desktop SERVICE_TYPES kcmodule.desktop) install( TARGETS kwin_wobblywindows_config DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) diff --git a/helpers/killer/CMakeLists.txt b/helpers/killer/CMakeLists.txt index 9468eaf55..79812b38d 100644 --- a/helpers/killer/CMakeLists.txt +++ b/helpers/killer/CMakeLists.txt @@ -1,16 +1,15 @@ ########### next target ############### -set(kwin_killer_helper_SRCS killer.cpp ) - +set(kwin_killer_helper_SRCS killer.cpp) add_executable(kwin_killer_helper ${kwin_killer_helper_SRCS}) target_link_libraries(kwin_killer_helper - Qt5::Widgets - Qt5::X11Extras KF5::AuthCore KF5::I18n KF5::WidgetsAddons + Qt5::Widgets + Qt5::X11Extras ) -install(TARGETS kwin_killer_helper DESTINATION ${LIBEXEC_INSTALL_DIR} ) +install(TARGETS kwin_killer_helper DESTINATION ${LIBEXEC_INSTALL_DIR}) diff --git a/kcmkwin/CMakeLists.txt b/kcmkwin/CMakeLists.txt index 258650680..c3de9340a 100644 --- a/kcmkwin/CMakeLists.txt +++ b/kcmkwin/CMakeLists.txt @@ -1,15 +1,15 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS) -add_subdirectory( common ) -add_subdirectory( kwincompositing ) -add_subdirectory( kwinoptions ) -add_subdirectory( kwindecoration ) -add_subdirectory( kwinrules ) -add_subdirectory( kwinscreenedges ) -add_subdirectory( kwinscripts ) -add_subdirectory( kwindesktop ) -add_subdirectory( kwineffects ) +add_subdirectory(common) +add_subdirectory(kwincompositing) +add_subdirectory(kwinoptions) +add_subdirectory(kwindecoration) +add_subdirectory(kwinrules) +add_subdirectory(kwinscreenedges) +add_subdirectory(kwinscripts) +add_subdirectory(kwindesktop) +add_subdirectory(kwineffects) -if( KWIN_BUILD_TABBOX ) -add_subdirectory( kwintabbox ) +if (KWIN_BUILD_TABBOX) + add_subdirectory(kwintabbox) endif() diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index 651993714..adbf3b6b4 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -1,33 +1,34 @@ ######################################################################### # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwincompositing\") add_definitions(-DQT_NO_URL_CAST_FROM_STRING) remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY) ################# configure checks and create the configured files ################# set(kwincomposing_SRC main.cpp - compositing.cpp) + compositing.cpp +) -qt5_add_dbus_interface( kwincomposing_SRC - ${KWIN_SOURCE_DIR}/org.kde.kwin.Compositing.xml kwin_compositing_interface) +qt5_add_dbus_interface(kwincomposing_SRC + ${KWIN_SOURCE_DIR}/org.kde.kwin.Compositing.xml kwin_compositing_interface +) ki18n_wrap_ui(kwincomposing_SRC compositing.ui) add_library(kwincompositing MODULE ${kwincomposing_SRC}) target_link_libraries(kwincompositing - Qt5::DBus - Qt5::Widgets - KF5::CoreAddons KF5::ConfigCore + KF5::CoreAddons KF5::I18n KF5::KCMUtils + Qt5::DBus + Qt5::Widgets ) -INSTALL(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES kwincompositing.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -################# list the subdirectories ################# +install(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES kwincompositing.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/kcmkwin/kwindecoration/CMakeLists.txt b/kcmkwin/kwindecoration/CMakeLists.txt index 461e858fb..f591f69d5 100644 --- a/kcmkwin/kwindecoration/CMakeLists.txt +++ b/kcmkwin/kwindecoration/CMakeLists.txt @@ -1,30 +1,30 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwindecoration\") add_subdirectory(declarative-plugin) set(kcmkwindecoration_SRCS + declarative-plugin/buttonsmodel.cpp + decorationmodel.cpp kcm.cpp utils.cpp - decorationmodel.cpp - declarative-plugin/buttonsmodel.cpp ) add_library(kcm_kwindecoration MODULE ${kcmkwindecoration_SRCS}) target_link_libraries(kcm_kwindecoration KDecoration2::KDecoration KF5::I18n - KF5::QuickAddons KF5::NewStuff + KF5::QuickAddons Qt5::Quick ) kcoreaddons_desktop_to_json(kcm_kwindecoration "kwindecoration.desktop" SERVICE_TYPES kcmodule.desktop) # This desktop file is installed only for retrocompatibility with sycoca install(FILES kwindecoration.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) install(FILES window-decorations.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) install(TARGETS kcm_kwindecoration DESTINATION ${KDE_INSTALL_PLUGINDIR}/kcms) kpackage_install_package(package kcm_kwindecoration kcms) diff --git a/kcmkwin/kwindesktop/CMakeLists.txt b/kcmkwin/kwindesktop/CMakeLists.txt index 8cb9c5a61..dabfc1ef2 100644 --- a/kcmkwin/kwindesktop/CMakeLists.txt +++ b/kcmkwin/kwindesktop/CMakeLists.txt @@ -1,34 +1,33 @@ include(ECMQMLModules) ecm_find_qmlmodule(org.kde.plasma.core 2.0) # KI18N Translation Domain for this library. add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwin_virtualdesktops\") ########### next target ############### set(kcm_kwin_virtualdesktops_PART_SRCS - virtualdesktops.cpp + ../../virtualdesktopsdbustypes.cpp animationsmodel.cpp desktopsmodel.cpp - ../../virtualdesktopsdbustypes.cpp + virtualdesktops.cpp ) add_library(kcm_kwin_virtualdesktops MODULE ${kcm_kwin_virtualdesktops_PART_SRCS}) target_link_libraries(kcm_kwin_virtualdesktops - Qt5::DBus KF5::I18n KF5::KCMUtils KF5::QuickAddons KF5::XmlGui + Qt5::DBus kcmkwincommon ) kcoreaddons_desktop_to_json(kcm_kwin_virtualdesktops "kcm_kwin_virtualdesktops.desktop") ########### install files ############### install(TARGETS kcm_kwin_virtualdesktops DESTINATION ${KDE_INSTALL_PLUGINDIR}/kcms) install(FILES kcm_kwin_virtualdesktops.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) kpackage_install_package(package kcm_kwin_virtualdesktops kcms) - diff --git a/kcmkwin/kwineffects/CMakeLists.txt b/kcmkwin/kwineffects/CMakeLists.txt index 4a554a4b8..1d97ef1ce 100644 --- a/kcmkwin/kwineffects/CMakeLists.txt +++ b/kcmkwin/kwineffects/CMakeLists.txt @@ -1,33 +1,33 @@ include(ECMQMLModules) ecm_find_qmlmodule(org.kde.plasma.core 2.0) # KI18N Translation Domain for this library. add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwin_effects\") ########### next target ############### set(kcm_kwin_effects_PART_SRCS kcm.cpp effectsfilterproxymodel.cpp ) add_library(kcm_kwin_effects MODULE ${kcm_kwin_effects_PART_SRCS}) target_link_libraries(kcm_kwin_effects - Qt5::DBus KF5::I18n KF5::KCMUtils KF5::NewStuff KF5::QuickAddons KF5::XmlGui + Qt5::DBus kcmkwincommon ) kcoreaddons_desktop_to_json(kcm_kwin_effects "kcm_kwin_effects.desktop") ########### install files ############### install(TARGETS kcm_kwin_effects DESTINATION ${KDE_INSTALL_PLUGINDIR}/kcms) install(FILES kcm_kwin_effects.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) install(FILES kwineffect.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) kpackage_install_package(package kcm_kwin_effects kcms) diff --git a/kcmkwin/kwinoptions/CMakeLists.txt b/kcmkwin/kwinoptions/CMakeLists.txt index ea719b391..dd7551fd7 100644 --- a/kcmkwin/kwinoptions/CMakeLists.txt +++ b/kcmkwin/kwinoptions/CMakeLists.txt @@ -1,18 +1,36 @@ ########### next target ############### # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwm\") -set(kcm_kwinoptions_PART_SRCS windows.cpp mouse.cpp main.cpp ${KWIN_SOURCE_DIR}/effects/effect_builtins.cpp ) -ki18n_wrap_ui(kcm_kwinoptions_PART_SRCS actions.ui advanced.ui focus.ui mouse.ui moving.ui) -qt5_add_dbus_interface( kcm_kwinoptions_PART_SRCS - ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) +set(kcm_kwinoptions_PART_SRCS + ${KWIN_SOURCE_DIR}/effects/effect_builtins.cpp + main.cpp + mouse.cpp + windows.cpp +) + +ki18n_wrap_ui(kcm_kwinoptions_PART_SRCS + actions.ui + advanced.ui + focus.ui + mouse.ui + moving.ui +) + +qt5_add_dbus_interface(kcm_kwinoptions_PART_SRCS ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) add_library(kcm_kwinoptions MODULE ${kcm_kwinoptions_PART_SRCS}) target_link_libraries(kcm_kwinoptions Qt5::DBus KF5::Completion KF5::I18n KF5::ConfigWidgets KF5::Service KF5::WindowSystem) -install(TARGETS kcm_kwinoptions DESTINATION ${PLUGIN_INSTALL_DIR} ) - +install(TARGETS kcm_kwinoptions DESTINATION ${PLUGIN_INSTALL_DIR}) ########### install files ############### -install( FILES kwinoptions.desktop kwinactions.desktop kwinadvanced.desktop - kwinfocus.desktop kwinmoving.desktop - DESTINATION ${SERVICES_INSTALL_DIR}) +install( + FILES + kwinactions.desktop + kwinadvanced.desktop + kwinfocus.desktop + kwinmoving.desktop + kwinoptions.desktop + DESTINATION + ${SERVICES_INSTALL_DIR} +) diff --git a/kcmkwin/kwinrules/CMakeLists.txt b/kcmkwin/kwinrules/CMakeLists.txt index 34bc7cbac..31d1e0341 100644 --- a/kcmkwin/kwinrules/CMakeLists.txt +++ b/kcmkwin/kwinrules/CMakeLists.txt @@ -1,62 +1,55 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinrules\") add_definitions(-DKCMRULES) ########### next target ############### include_directories(../../) -set (kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h) +set(kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h) qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS}) set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp ${kwinrules_MOC_SRCS}) ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui) set(kwin_rules_dialog_KDEINIT_SRCS main.cpp ${kwinrules_SRCS}) -kf5_add_kdeinit_executable( kwin_rules_dialog ${kwin_rules_dialog_KDEINIT_SRCS}) +kf5_add_kdeinit_executable(kwin_rules_dialog ${kwin_rules_dialog_KDEINIT_SRCS}) set(kwin_kcm_rules_XCB_LIBS + XCB::CURSOR XCB::XCB XCB::XFIXES - XCB::CURSOR ) set(kcm_libs - Qt5::Concurrent - Qt5::X11Extras KF5::Completion KF5::ConfigWidgets KF5::I18n KF5::Service KF5::WindowSystem KF5::XmlGui + Qt5::Concurrent + Qt5::X11Extras ) -if(KWIN_BUILD_ACTIVITIES) +if (KWIN_BUILD_ACTIVITIES) set(kcm_libs ${kcm_libs} KF5::Activities) endif() target_link_libraries(kdeinit_kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) -install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS} ) -install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR} ) +install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR}) ########### next target ############### set(kcm_kwinrules_PART_SRCS kcm.cpp ${kwinrules_SRCS}) - add_library(kcm_kwinrules MODULE ${kcm_kwinrules_PART_SRCS}) target_link_libraries(kcm_kwinrules ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) -install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### next target ############### - +install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR}) ########### install files ############### -install( FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - +install(FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index 42506f623..8b1e05c13 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -1,36 +1,33 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinscreenedges\") include_directories(${KWIN_SOURCE_DIR}/effects) -set( - kcm_screenedges_SRCS +set(kcm_screenedges_SRCS monitor.cpp screenpreviewwidget.cpp - ) -qt5_add_dbus_interface( kcm_screenedges_SRCS - ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) +) +qt5_add_dbus_interface(kcm_screenedges_SRCS ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) set(kcm_kwinscreenedges_PART_SRCS main.cpp ${kcm_screenedges_SRCS}) -ki18n_wrap_ui( kcm_kwinscreenedges_PART_SRCS main.ui ) -add_library( kcm_kwinscreenedges MODULE ${kcm_kwinscreenedges_PART_SRCS} ) +ki18n_wrap_ui(kcm_kwinscreenedges_PART_SRCS main.ui) +add_library(kcm_kwinscreenedges MODULE ${kcm_kwinscreenedges_PART_SRCS}) set(kcm_screenedges_LIBS - Qt5::DBus KF5::Completion KF5::ConfigCore KF5::ConfigWidgets KF5::I18n - KF5::Service KF5::Package KF5::Plasma + KF5::Service + Qt5::DBus kwin4_effect_builtins ) -target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} ${kcm_screenedges_LIBS}) +target_link_libraries(kcm_kwinscreenedges ${X11_LIBRARIES} ${kcm_screenedges_LIBS}) set(kcm_kwintouchscreenedges_PART_SRCS touch.cpp ${kcm_screenedges_SRCS}) -ki18n_wrap_ui( kcm_kwintouchscreenedges_PART_SRCS touch.ui ) -add_library( kcm_kwintouchscreen MODULE ${kcm_kwintouchscreenedges_PART_SRCS} ) -target_link_libraries( kcm_kwintouchscreen ${X11_LIBRARIES} ${kcm_screenedges_LIBS}) - -install( TARGETS kcm_kwinscreenedges kcm_kwintouchscreen DESTINATION ${PLUGIN_INSTALL_DIR} ) +ki18n_wrap_ui(kcm_kwintouchscreenedges_PART_SRCS touch.ui) +add_library(kcm_kwintouchscreen MODULE ${kcm_kwintouchscreenedges_PART_SRCS}) +target_link_libraries(kcm_kwintouchscreen ${X11_LIBRARIES} ${kcm_screenedges_LIBS}) -install( FILES kwinscreenedges.desktop kwintouchscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install(TARGETS kcm_kwinscreenedges kcm_kwintouchscreen DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES kwinscreenedges.desktop kwintouchscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/kcmkwin/kwinscripts/CMakeLists.txt b/kcmkwin/kwinscripts/CMakeLists.txt index 66145e9e0..b79a3f5c7 100644 --- a/kcmkwin/kwinscripts/CMakeLists.txt +++ b/kcmkwin/kwinscripts/CMakeLists.txt @@ -1,27 +1,27 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcm-kwin-scripts\") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(kcm_SRCS main.cpp module.cpp ) ki18n_wrap_ui(kcm_SRCS module.ui) add_library(kcm_kwin_scripts MODULE ${kcm_SRCS}) target_link_libraries(kcm_kwin_scripts - Qt5::DBus + KF5::I18n KF5::KCMUtils KF5::KIOCore - KF5::I18n - KF5::Package KF5::NewStuff + KF5::Package + Qt5::DBus ) install(TARGETS kcm_kwin_scripts DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES kwinscripts.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(FILES kwinscripts.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) +install(FILES kwinscripts.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) diff --git a/kcmkwin/kwintabbox/CMakeLists.txt b/kcmkwin/kwintabbox/CMakeLists.txt index b6b932b0f..d5a1f28c6 100644 --- a/kcmkwin/kwintabbox/CMakeLists.txt +++ b/kcmkwin/kwintabbox/CMakeLists.txt @@ -1,40 +1,38 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwintabbox\") -include_directories( ${KWIN_SOURCE_DIR}/effects ${KWIN_SOURCE_DIR}/tabbox ${KWIN_SOURCE_DIR}) +include_directories(${KWIN_SOURCE_DIR}/effects ${KWIN_SOURCE_DIR}/tabbox ${KWIN_SOURCE_DIR}) ########### next target ############### set(kcm_kwintabbox_PART_SRCS - main.cpp + ${KWIN_SOURCE_DIR}/tabbox/tabboxconfig.cpp layoutpreview.cpp + main.cpp thumbnailitem.cpp - ${KWIN_SOURCE_DIR}/tabbox/tabboxconfig.cpp ) -ki18n_wrap_ui( kcm_kwintabbox_PART_SRCS main.ui ) -qt5_add_dbus_interface( kcm_kwintabbox_PART_SRCS - ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) +ki18n_wrap_ui(kcm_kwintabbox_PART_SRCS main.ui) +qt5_add_dbus_interface(kcm_kwintabbox_PART_SRCS ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) add_library(kcm_kwintabbox MODULE ${kcm_kwintabbox_PART_SRCS}) target_link_libraries(kcm_kwintabbox - Qt5::Quick - KF5::KCMUtils KF5::Completion KF5::GlobalAccel KF5::I18n - KF5::Service + KF5::KCMUtils KF5::NewStuff KF5::Package + KF5::Service + Qt5::Quick XCB::XCB kwin4_effect_builtins ) -install(TARGETS kcm_kwintabbox DESTINATION ${PLUGIN_INSTALL_DIR} ) - +install(TARGETS kcm_kwintabbox DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### install files ############### -install( FILES kwintabbox.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES thumbnails/konqueror.png thumbnails/kmail.png thumbnails/systemsettings.png thumbnails/dolphin.png DESTINATION ${DATA_INSTALL_DIR}/kwin/kcm_kwintabbox) -install( FILES kwinswitcher.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) +install(FILES kwintabbox.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install(FILES thumbnails/konqueror.png thumbnails/kmail.png thumbnails/systemsettings.png thumbnails/dolphin.png DESTINATION ${DATA_INSTALL_DIR}/kwin/kcm_kwintabbox) +install(FILES kwinswitcher.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) diff --git a/libkwineffects/CMakeLists.txt b/libkwineffects/CMakeLists.txt index 29d205af3..3cce6b580 100644 --- a/libkwineffects/CMakeLists.txt +++ b/libkwineffects/CMakeLists.txt @@ -1,120 +1,120 @@ ########### next target ############### include(ECMSetupVersion) ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KWINEFFECTS VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwineffects_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KWinEffectsConfigVersion.cmake" SOVERSION 12 ) ### xrenderutils lib ### set(kwin_XRENDERUTILS_SRCS kwinxrenderutils.cpp logging.cpp - ) +) add_library(kwinxrenderutils SHARED ${kwin_XRENDERUTILS_SRCS}) generate_export_header(kwinxrenderutils EXPORT_FILE_NAME kwinxrenderutils_export.h) target_link_libraries(kwinxrenderutils PUBLIC + KF5::WaylandServer Qt5::Core Qt5::Gui + XCB::RENDER XCB::XCB XCB::XFIXES - XCB::RENDER - KF5::WaylandServer - ) +) set_target_properties(kwinxrenderutils PROPERTIES VERSION ${KWINEFFECTS_VERSION_STRING} SOVERSION ${KWINEFFECTS_SOVERSION} ) set_target_properties(kwinxrenderutils PROPERTIES OUTPUT_NAME ${KWIN_NAME}xrenderutils) install(TARGETS kwinxrenderutils EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) ### effects lib ### set(kwin_EFFECTSLIB_SRCS - kwineffects.cpp anidata.cpp kwinanimationeffect.cpp + kwineffects.cpp logging.cpp - ) +) set(kwineffects_QT_LIBS Qt5::DBus Qt5::Widgets ) set(kwineffects_KDE_LIBS KF5::ConfigCore KF5::CoreAddons KF5::WindowSystem ) set(kwineffects_XCB_LIBS XCB::XCB ) add_library(kwineffects SHARED ${kwin_EFFECTSLIB_SRCS}) generate_export_header(kwineffects EXPORT_FILE_NAME kwineffects_export.h) target_link_libraries(kwineffects -PUBLIC - ${kwineffects_QT_LIBS} - ${kwineffects_KDE_LIBS} - ${kwineffects_XCB_LIBS} + PUBLIC + ${kwineffects_QT_LIBS} + ${kwineffects_KDE_LIBS} + ${kwineffects_XCB_LIBS} ) -if( KWIN_HAVE_XRENDER_COMPOSITING ) +if (KWIN_HAVE_XRENDER_COMPOSITING) target_link_libraries(kwineffects PRIVATE kwinxrenderutils XCB::XFIXES) endif() set_target_properties(kwineffects PROPERTIES VERSION ${KWINEFFECTS_VERSION_STRING} SOVERSION ${KWINEFFECTS_SOVERSION} ) set_target_properties(kwineffects PROPERTIES OUTPUT_NAME ${KWIN_NAME}effects) install(TARGETS kwineffects EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) # kwingl(es)utils library set(kwin_GLUTILSLIB_SRCS - kwinglutils.cpp + kwinglplatform.cpp kwingltexture.cpp + kwinglutils.cpp kwinglutils_funcs.cpp - kwinglplatform.cpp logging.cpp - ) +) -macro( KWIN4_ADD_GLUTILS_BACKEND name glinclude ) +macro(KWIN4_ADD_GLUTILS_BACKEND name glinclude) include_directories(${glinclude}) add_library(${name} SHARED ${kwin_GLUTILSLIB_SRCS}) generate_export_header(${name} BASE_NAME kwinglutils EXPORT_FILE_NAME kwinglutils_export.h) target_link_libraries(${name} PUBLIC XCB::XCB KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem) set_target_properties(${name} PROPERTIES VERSION ${KWINEFFECTS_VERSION_STRING} SOVERSION ${KWINEFFECTS_SOVERSION} ) target_link_libraries(${name} PUBLIC ${ARGN}) install(TARGETS ${name} EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) endmacro() kwin4_add_glutils_backend(kwinglutils ${epoxy_INCLUDE_DIR} ${epoxy_LIBRARY}) set_target_properties(kwinglutils PROPERTIES OUTPUT_NAME ${KWIN_NAME}glutils) target_link_libraries(kwinglutils PUBLIC ${epoxy_LIBRARY}) -install( FILES - kwinglobals.h - kwineffects.h +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h + ${CMAKE_CURRENT_BINARY_DIR}/kwineffects_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kwinglutils_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kwinxrenderutils_export.h kwinanimationeffect.h + kwineffects.h + kwinglobals.h kwinglplatform.h + kwingltexture.h kwinglutils.h kwinglutils_funcs.h - kwingltexture.h kwinxrenderutils.h - ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h - ${CMAKE_CURRENT_BINARY_DIR}/kwineffects_export.h - ${CMAKE_CURRENT_BINARY_DIR}/kwinglutils_export.h - ${CMAKE_CURRENT_BINARY_DIR}/kwinxrenderutils_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 1624fb2b9..9f26622d9 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,11 +1,11 @@ add_subdirectory(kglobalaccel) add_subdirectory(qpa) add_subdirectory(idletime) add_subdirectory(platforms) add_subdirectory(scenes) add_subdirectory(windowsystem) add_subdirectory(kpackage) -if(KWIN_BUILD_DECORATIONS) +if (KWIN_BUILD_DECORATIONS) add_subdirectory(kdecorations) endif() diff --git a/plugins/idletime/CMakeLists.txt b/plugins/idletime/CMakeLists.txt index 21c0dc732..1325755b0 100644 --- a/plugins/idletime/CMakeLists.txt +++ b/plugins/idletime/CMakeLists.txt @@ -1,18 +1,18 @@ set(idletime_plugin_SRCS poller.cpp ) add_library(KF5IdleTimeKWinWaylandPrivatePlugin MODULE ${idletime_plugin_SRCS}) set_target_properties(KF5IdleTimeKWinWaylandPrivatePlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/org.kde.kidletime.platforms/") target_link_libraries(KF5IdleTimeKWinWaylandPrivatePlugin - kwin KF5::IdleTime KF5::WaylandClient + kwin ) install( TARGETS KF5IdleTimeKWinWaylandPrivatePlugin DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/org.kde.kidletime.platforms/ ) diff --git a/plugins/kdecorations/CMakeLists.txt b/plugins/kdecorations/CMakeLists.txt index dacf9add6..2bce237af 100644 --- a/plugins/kdecorations/CMakeLists.txt +++ b/plugins/kdecorations/CMakeLists.txt @@ -1,2 +1,2 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kwin_clients\") -add_subdirectory( aurorae ) +add_subdirectory(aurorae) diff --git a/plugins/kdecorations/aurorae/src/CMakeLists.txt b/plugins/kdecorations/aurorae/src/CMakeLists.txt index ea032d473..60423766c 100644 --- a/plugins/kdecorations/aurorae/src/CMakeLists.txt +++ b/plugins/kdecorations/aurorae/src/CMakeLists.txt @@ -1,68 +1,70 @@ ########### decoration ############### include_directories( - ./lib - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} + ./lib + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} ) set(kwin5_aurorae_PART_SRCS aurorae.cpp decorationoptions.cpp lib/auroraetheme.cpp lib/themeconfig.cpp ) add_library(kwin5_aurorae MODULE ${kwin5_aurorae_PART_SRCS}) set_target_properties(kwin5_aurorae PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kdecoration2/") target_link_libraries(kwin5_aurorae KDecoration2::KDecoration KF5::ConfigWidgets KF5::I18n KF5::Package KF5::WindowSystem Qt5::Quick Qt5::UiTools ) install(TARGETS kwin5_aurorae DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kdecoration2) set(decoration_plugin_SRCS - decorationplugin.cpp - decorationoptions.cpp colorhelper.cpp - ) + decorationoptions.cpp + decorationplugin.cpp +) add_library(decorationplugin SHARED ${decoration_plugin_SRCS}) set_target_properties(decorationplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org/kde/kwin/decoration/") target_link_libraries(decorationplugin - Qt5::Quick KDecoration2::KDecoration KF5::ConfigWidgets + Qt5::Quick ) install(TARGETS decorationplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration) ########### install files ############### -install( FILES aurorae.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) -install( FILES - qml/aurorae.qml - qml/AuroraeButton.qml - qml/AuroraeButtonGroup.qml - qml/AuroraeMaximizeButton.qml - qml/Decoration.qml - qml/DecorationButton.qml - qml/MenuButton.qml - qml/AppMenuButton.qml - DESTINATION ${DATA_INSTALL_DIR}/kwin/aurorae ) +install(FILES aurorae.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) +install( + FILES + qml/AppMenuButton.qml + qml/AuroraeButton.qml + qml/AuroraeButtonGroup.qml + qml/AuroraeMaximizeButton.qml + qml/Decoration.qml + qml/DecorationButton.qml + qml/MenuButton.qml + qml/aurorae.qml + DESTINATION + ${DATA_INSTALL_DIR}/kwin/aurorae) set(QMLFILES + qml/AppMenuButton.qml + qml/ButtonGroup.qml qml/Decoration.qml qml/DecorationButton.qml qml/MenuButton.qml - qml/AppMenuButton.qml - qml/ButtonGroup.qml qml/qmldir ) -install( FILES ${QMLFILES} DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration ) +install(FILES ${QMLFILES} DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration) file(COPY ${QMLFILES} DESTINATION ${CMAKE_BINARY_DIR}/bin/org/kde/kwin/decoration/) -install( FILES kwindecoration.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +install(FILES kwindecoration.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) diff --git a/plugins/kdecorations/aurorae/themes/plastik/code/CMakeLists.txt b/plugins/kdecorations/aurorae/themes/plastik/code/CMakeLists.txt index cc0a3f819..546353907 100644 --- a/plugins/kdecorations/aurorae/themes/plastik/code/CMakeLists.txt +++ b/plugins/kdecorations/aurorae/themes/plastik/code/CMakeLists.txt @@ -1,11 +1,11 @@ set(plastik_plugin_SRCS plastikbutton.cpp plastikplugin.cpp - ) +) add_library(plastikplugin SHARED ${plastik_plugin_SRCS}) set_target_properties(plastikplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org/kde/kwin/decorations/plastik") target_link_libraries(plastikplugin Qt5::Core Qt5::Quick KF5::ConfigWidgets) install(TARGETS plastikplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decorations/plastik) install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decorations/plastik) file(COPY qmldir DESTINATION ${CMAKE_BINARY_DIR}/bin/org/kde/kwin/decorations/plastik) diff --git a/plugins/platforms/CMakeLists.txt b/plugins/platforms/CMakeLists.txt index 9058f0a1e..eef7aed04 100644 --- a/plugins/platforms/CMakeLists.txt +++ b/plugins/platforms/CMakeLists.txt @@ -1,12 +1,12 @@ -if(HAVE_DRM) +if (HAVE_DRM) add_subdirectory(drm) endif() if (HAVE_LINUX_FB_H) add_subdirectory(fbdev) endif() -if(HAVE_LIBHYBRIS) +if (HAVE_LIBHYBRIS) add_subdirectory(hwcomposer) endif() add_subdirectory(virtual) add_subdirectory(wayland) add_subdirectory(x11) diff --git a/plugins/platforms/drm/CMakeLists.txt b/plugins/platforms/drm/CMakeLists.txt index 6a02df5dd..eff0f8e93 100644 --- a/plugins/platforms/drm/CMakeLists.txt +++ b/plugins/platforms/drm/CMakeLists.txt @@ -1,46 +1,46 @@ set(DRM_SOURCES drm_backend.cpp drm_object.cpp drm_object_connector.cpp drm_object_crtc.cpp drm_object_plane.cpp drm_output.cpp drm_buffer.cpp drm_inputeventfilter.cpp edid.cpp logging.cpp scene_qpainter_drm_backend.cpp screens_drm.cpp ) -if(HAVE_GBM) +if (HAVE_GBM) set(DRM_SOURCES ${DRM_SOURCES} egl_gbm_backend.cpp drm_buffer_gbm.cpp gbm_surface.cpp remoteaccess_manager.cpp ) endif() -if(HAVE_EGL_STREAMS) +if (HAVE_EGL_STREAMS) set(DRM_SOURCES ${DRM_SOURCES} egl_stream_backend.cpp ) endif() include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES}) set_target_properties(KWinWaylandDrmBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm SceneQPainterBackend SceneOpenGLBackend) -if(HAVE_GBM) +if (HAVE_GBM) target_link_libraries(KWinWaylandDrmBackend gbm::gbm) endif() install( TARGETS KWinWaylandDrmBackend DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/ ) diff --git a/plugins/platforms/hwcomposer/CMakeLists.txt b/plugins/platforms/hwcomposer/CMakeLists.txt index 772d4e86a..c3cbf5dde 100644 --- a/plugins/platforms/hwcomposer/CMakeLists.txt +++ b/plugins/platforms/hwcomposer/CMakeLists.txt @@ -1,24 +1,24 @@ set(HWCOMPOSER_SOURCES egl_hwcomposer_backend.cpp hwcomposer_backend.cpp logging.cpp screens_hwcomposer.cpp ) include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(KWinWaylandHwcomposerBackend MODULE ${HWCOMPOSER_SOURCES}) set_target_properties(KWinWaylandHwcomposerBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") target_link_libraries(KWinWaylandHwcomposerBackend + SceneOpenGLBackend kwin - libhybris::libhardware libhybris::hwcomposer libhybris::hybriseglplatform - SceneOpenGLBackend + libhybris::libhardware ) install( TARGETS KWinWaylandHwcomposerBackend DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/ ) diff --git a/plugins/platforms/virtual/CMakeLists.txt b/plugins/platforms/virtual/CMakeLists.txt index 532a8857f..ae63d0815 100644 --- a/plugins/platforms/virtual/CMakeLists.txt +++ b/plugins/platforms/virtual/CMakeLists.txt @@ -1,22 +1,22 @@ set(VIRTUAL_SOURCES egl_gbm_backend.cpp - virtual_backend.cpp - virtual_output.cpp scene_qpainter_virtual_backend.cpp screens_virtual.cpp + virtual_backend.cpp + virtual_output.cpp ) include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category(VIRTUAL_SOURCES HEADER logging.h IDENTIFIER KWIN_VIRTUAL CATEGORY_NAME kwin_platform_virtual DEFAULT_SEVERITY Critical) add_library(KWinWaylandVirtualBackend MODULE ${VIRTUAL_SOURCES}) set_target_properties(KWinWaylandVirtualBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") target_link_libraries(KWinWaylandVirtualBackend kwin SceneQPainterBackend SceneOpenGLBackend) install( TARGETS KWinWaylandVirtualBackend DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/ ) diff --git a/plugins/platforms/wayland/CMakeLists.txt b/plugins/platforms/wayland/CMakeLists.txt index 733a6acfe..13320b4dc 100644 --- a/plugins/platforms/wayland/CMakeLists.txt +++ b/plugins/platforms/wayland/CMakeLists.txt @@ -1,26 +1,26 @@ set(WAYLAND_BACKEND_SOURCES logging.cpp scene_qpainter_wayland_backend.cpp wayland_backend.cpp wayland_output.cpp ) -if(HAVE_WAYLAND_EGL) +if (HAVE_WAYLAND_EGL) set(WAYLAND_BACKEND_SOURCES egl_wayland_backend.cpp ${WAYLAND_BACKEND_SOURCES}) endif() include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES}) set_target_properties(KWinWaylandWaylandBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient SceneQPainterBackend) -if(HAVE_WAYLAND_EGL) +if (HAVE_WAYLAND_EGL) target_link_libraries(KWinWaylandWaylandBackend SceneOpenGLBackend Wayland::Egl) endif() install( TARGETS KWinWaylandWaylandBackend DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/ ) diff --git a/plugins/platforms/x11/CMakeLists.txt b/plugins/platforms/x11/CMakeLists.txt index 8addf0b52..c62bb4476 100644 --- a/plugins/platforms/x11/CMakeLists.txt +++ b/plugins/platforms/x11/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(common) add_subdirectory(standalone) -if(X11_XCB_FOUND) +if (X11_XCB_FOUND) add_subdirectory(windowed) endif() diff --git a/plugins/platforms/x11/common/CMakeLists.txt b/plugins/platforms/x11/common/CMakeLists.txt index 677f9f6c9..d52ff2550 100644 --- a/plugins/platforms/x11/common/CMakeLists.txt +++ b/plugins/platforms/x11/common/CMakeLists.txt @@ -1,9 +1,9 @@ -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-int-to-pointer-cast") endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-int-to-void-pointer-cast") endif() include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(eglx11common STATIC eglonxbackend.cpp) target_link_libraries(eglx11common kwin) diff --git a/plugins/platforms/x11/standalone/CMakeLists.txt b/plugins/platforms/x11/standalone/CMakeLists.txt index 80c139b77..6bfbc4a03 100644 --- a/plugins/platforms/x11/standalone/CMakeLists.txt +++ b/plugins/platforms/x11/standalone/CMakeLists.txt @@ -1,45 +1,45 @@ set(X11PLATFORM_SOURCES edge.cpp + effects_mouse_interception_x11_filter.cpp + effects_x11.cpp logging.cpp - x11cursor.cpp - x11_platform.cpp - x11_output.cpp - screens_xrandr.cpp - windowselector.cpp + non_composited_outline.cpp overlaywindow_x11.cpp screenedges_filter.cpp - non_composited_outline.cpp + screens_xrandr.cpp + sync_filter.cpp + windowselector.cpp x11_decoration_renderer.cpp + x11_output.cpp + x11_platform.cpp + x11cursor.cpp xfixes_cursor_event_filter.cpp - effects_x11.cpp - effects_mouse_interception_x11_filter.cpp - sync_filter.cpp ) -if(X11_Xinput_FOUND) +if (X11_Xinput_FOUND) set(X11PLATFORM_SOURCES ${X11PLATFORM_SOURCES} xinputintegration.cpp) endif() -if(HAVE_EPOXY_GLX) +if (HAVE_EPOXY_GLX) set(X11PLATFORM_SOURCES ${X11PLATFORM_SOURCES} glxbackend.cpp glx_context_attribute_builder.cpp) endif() include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES}) set_target_properties(KWinX11Platform PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.platforms/") target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend Qt5::X11Extras XCB::CURSOR KF5::Crash) -if(X11_Xinput_FOUND) +if (X11_Xinput_FOUND) target_link_libraries(KWinX11Platform ${X11_Xinput_LIB}) endif() -if(HAVE_DL_LIBRARY) +if (HAVE_DL_LIBRARY) target_link_libraries(KWinX11Platform ${DL_LIBRARY}) endif() install( TARGETS KWinX11Platform DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.platforms/ ) diff --git a/plugins/platforms/x11/windowed/CMakeLists.txt b/plugins/platforms/x11/windowed/CMakeLists.txt index 0c86345b6..815c0ee1c 100644 --- a/plugins/platforms/x11/windowed/CMakeLists.txt +++ b/plugins/platforms/x11/windowed/CMakeLists.txt @@ -1,22 +1,22 @@ set(X11BACKEND_SOURCES - logging.cpp egl_x11_backend.cpp + logging.cpp scene_qpainter_x11_backend.cpp x11windowed_backend.cpp x11windowed_output.cpp ) include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl) add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES}) set_target_properties(KWinWaylandX11Backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB SceneQPainterBackend SceneOpenGLBackend) -if(X11_Xinput_FOUND) +if (X11_Xinput_FOUND) target_link_libraries(KWinWaylandX11Backend ${X11_Xinput_LIB}) endif() install( TARGETS KWinWaylandX11Backend DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/ ) diff --git a/plugins/qpa/CMakeLists.txt b/plugins/qpa/CMakeLists.txt index 882c0c32e..ab9dbc913 100644 --- a/plugins/qpa/CMakeLists.txt +++ b/plugins/qpa/CMakeLists.txt @@ -1,43 +1,43 @@ include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS}) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) set(QPA_SOURCES abstractplatformcontext.cpp backingstore.cpp eglhelpers.cpp integration.cpp main.cpp nativeinterface.cpp offscreensurface.cpp platformcursor.cpp screen.cpp sharingplatformcontext.cpp window.cpp ) include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category(QPA_SOURCES HEADER logging.h IDENTIFIER KWIN_QPA CATEGORY_NAME kwin_qpa_plugin DEFAULT_SEVERITY Critical) add_library(KWinQpaPlugin MODULE ${QPA_SOURCES}) set_target_properties(KWinQpaPlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/platforms/") set(QT5PLATFORMSUPPORT_LIBS - Qt5FontDatabaseSupport::Qt5FontDatabaseSupport - Qt5ThemeSupport::Qt5ThemeSupport - Qt5EventDispatcherSupport::Qt5EventDispatcherSupport + Qt5FontDatabaseSupport::Qt5FontDatabaseSupport + Qt5ThemeSupport::Qt5ThemeSupport + Qt5EventDispatcherSupport::Qt5EventDispatcherSupport ) target_link_libraries(KWinQpaPlugin - kwin - KF5::WaylandClient + ${FREETYPE_LIBRARIES} ${QT5PLATFORMSUPPORT_LIBS} Fontconfig::Fontconfig - ${FREETYPE_LIBRARIES} + KF5::WaylandClient + kwin ) install( TARGETS KWinQpaPlugin DESTINATION ${PLUGIN_INSTALL_DIR}/platforms/ ) diff --git a/plugins/scenes/CMakeLists.txt b/plugins/scenes/CMakeLists.txt index eb84a43ce..5c55688e8 100644 --- a/plugins/scenes/CMakeLists.txt +++ b/plugins/scenes/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(opengl) add_subdirectory(qpainter) -if( KWIN_BUILD_XRENDER_COMPOSITING ) +if (KWIN_BUILD_XRENDER_COMPOSITING) add_subdirectory(xrender) endif() diff --git a/plugins/scenes/opengl/CMakeLists.txt b/plugins/scenes/opengl/CMakeLists.txt index 1134f0644..ac47c82ae 100644 --- a/plugins/scenes/opengl/CMakeLists.txt +++ b/plugins/scenes/opengl/CMakeLists.txt @@ -1,32 +1,32 @@ set(SCENE_OPENGL_SRCS - scene_opengl.cpp lanczosfilter.cpp + scene_opengl.cpp ) include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category( SCENE_OPENGL_SRCS HEADER logging.h IDENTIFIER KWIN_OPENGL CATEGORY_NAME kwin_scene_opengl DEFAULT_SEVERITY Critical ) qt5_add_resources(SCENE_OPENGL_SRCS resources.qrc) add_library(KWinSceneOpenGL MODULE ${SCENE_OPENGL_SRCS}) set_target_properties(KWinSceneOpenGL PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.scenes/") target_link_libraries(KWinSceneOpenGL - kwin SceneOpenGLBackend + kwin ) install( TARGETS KWinSceneOpenGL DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.scenes/ ) diff --git a/plugins/scenes/qpainter/CMakeLists.txt b/plugins/scenes/qpainter/CMakeLists.txt index 24f0d9c54..a68bcb20c 100644 --- a/plugins/scenes/qpainter/CMakeLists.txt +++ b/plugins/scenes/qpainter/CMakeLists.txt @@ -1,15 +1,15 @@ set(SCENE_QPAINTER_SRCS scene_qpainter.cpp) add_library(KWinSceneQPainter MODULE scene_qpainter.cpp) set_target_properties(KWinSceneQPainter PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.scenes/") target_link_libraries(KWinSceneQPainter - kwin SceneQPainterBackend + kwin ) install( TARGETS KWinSceneQPainter DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kwin.scenes/ ) diff --git a/plugins/windowsystem/CMakeLists.txt b/plugins/windowsystem/CMakeLists.txt index 48474c325..68305c955 100644 --- a/plugins/windowsystem/CMakeLists.txt +++ b/plugins/windowsystem/CMakeLists.txt @@ -1,19 +1,16 @@ set(kwindowsystem_plugin_SRCS plugin.cpp windoweffects.cpp windowsystem.cpp ) - add_library(KF5WindowSystemKWinPrivatePlugin MODULE ${kwindowsystem_plugin_SRCS}) set_target_properties(KF5WindowSystemKWinPrivatePlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/org.kde.kwindowsystem.platforms/") -target_link_libraries(KF5WindowSystemKWinPrivatePlugin - kwin -) +target_link_libraries(KF5WindowSystemKWinPrivatePlugin kwin) install( TARGETS KF5WindowSystemKWinPrivatePlugin DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/org.kde.kwindowsystem.platforms/ ) diff --git a/qml/CMakeLists.txt b/qml/CMakeLists.txt index 4a0d1af23..9be5dd3aa 100644 --- a/qml/CMakeLists.txt +++ b/qml/CMakeLists.txt @@ -1,3 +1,3 @@ -install( DIRECTORY outline/plasma DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/outline ) -install( DIRECTORY onscreennotification/plasma DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/onscreennotification ) -install( DIRECTORY virtualkeyboard DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME} ) +install(DIRECTORY outline/plasma DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/outline) +install(DIRECTORY onscreennotification/plasma DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/onscreennotification) +install(DIRECTORY virtualkeyboard DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}) diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index 2160a4f0c..ca101bf25 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -1,10 +1,11 @@ set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp) qt5_add_dbus_interface(kcm_kwin4_genericscripted_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS}) -target_link_libraries( kcm_kwin4_genericscripted +target_link_libraries(kcm_kwin4_genericscripted KF5::ConfigWidgets #KCModule KF5::I18n KF5::Service Qt5::DBus - Qt5::UiTools ) -install( TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs ) + Qt5::UiTools +) +install(TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs) diff --git a/tabbox/CMakeLists.txt b/tabbox/CMakeLists.txt index 030bd33fb..74652e107 100644 --- a/tabbox/CMakeLists.txt +++ b/tabbox/CMakeLists.txt @@ -1,3 +1,3 @@ # Install the KWin/WindowSwitcher service type -install( FILES kwinwindowswitcher.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -install( FILES kwindesktopswitcher.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +install(FILES kwinwindowswitcher.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) +install(FILES kwindesktopswitcher.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 85feee11a..8230d028c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,56 +1,54 @@ if (XCB_ICCCM_FOUND) set(normalhintsbasesizetest_SRCS normalhintsbasesizetest.cpp) add_executable(normalhintsbasesizetest ${normalhintsbasesizetest_SRCS}) target_link_libraries(normalhintsbasesizetest XCB::XCB XCB::ICCCM KF5::WindowSystem) endif() # next target set(screenedgeshowtest_SRCS screenedgeshowtest.cpp) add_executable(screenedgeshowtest ${screenedgeshowtest_SRCS}) target_link_libraries(screenedgeshowtest Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem KF5::WaylandClient ${XCB_XCB_LIBRARY}) if (KF5Wayland_FOUND) add_definitions(-DSOURCE_DIR="${KWIN_SOURCE_DIR}") - set(waylandclienttest_SRCS - waylandclienttest.cpp - ) + set(waylandclienttest_SRCS waylandclienttest.cpp) add_executable(waylandclienttest ${waylandclienttest_SRCS}) target_link_libraries(waylandclienttest Qt5::Core Qt5::Gui KF5::WaylandClient) endif() set(libinputtest_SRCS - libinputtest.cpp - ${KWIN_SOURCE_DIR}/libinput/context.cpp - ${KWIN_SOURCE_DIR}/libinput/connection.cpp - ${KWIN_SOURCE_DIR}/libinput/device.cpp - ${KWIN_SOURCE_DIR}/libinput/events.cpp - ${KWIN_SOURCE_DIR}/libinput/libinput_logging.cpp - ${KWIN_SOURCE_DIR}/logind.cpp - ${KWIN_SOURCE_DIR}/udev.cpp + ${KWIN_SOURCE_DIR}/libinput/connection.cpp + ${KWIN_SOURCE_DIR}/libinput/context.cpp + ${KWIN_SOURCE_DIR}/libinput/device.cpp + ${KWIN_SOURCE_DIR}/libinput/events.cpp + ${KWIN_SOURCE_DIR}/libinput/libinput_logging.cpp + ${KWIN_SOURCE_DIR}/logind.cpp + ${KWIN_SOURCE_DIR}/udev.cpp + libinputtest.cpp ) add_executable(libinputtest ${libinputtest_SRCS}) add_definitions(-DKWIN_BUILD_TESTING) target_link_libraries(libinputtest Qt5::Core Qt5::DBus Libinput::Libinput ${UDEV_LIBS} KF5::ConfigCore KF5::GlobalAccel KF5::WindowSystem) add_executable(x11shadowreader x11shadowreader.cpp) target_link_libraries(x11shadowreader XCB::XCB Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem) add_executable(pointerconstraints pointerconstraintstest.cpp) add_definitions(-DDIR="${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(pointerconstraints XCB::XCB Qt5::Gui Qt5::Quick KF5::WaylandClient) add_executable(pointergestures pointergesturestest.cpp) add_definitions(-DDIR="${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(pointergestures Qt5::Gui Qt5::Quick KF5::WaylandClient) add_executable(cursorhotspottest cursorhotspottest.cpp) target_link_libraries(cursorhotspottest Qt5::Widgets) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -set( orientationtest_SRCS - orientationtest.cpp +set(orientationtest_SRCS ../orientation_sensor.cpp + orientationtest.cpp ) -qt5_add_dbus_adaptor( orientationtest_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) +qt5_add_dbus_adaptor(orientationtest_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor) add_executable(orientationtest ${orientationtest_SRCS}) target_link_libraries(orientationtest Qt5::DBus Qt5::Widgets Qt5::Sensors KF5::ConfigCore KF5::Notifications KF5::I18n)