diff --git a/CMakeLists.txt b/CMakeLists.txt index 561656900..42b3118c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,762 +1,761 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -project(KWIN) +project(KWin) set(PROJECT_VERSION "5.18.80") set(PROJECT_VERSION_MAJOR 5) set(QT_MIN_VERSION "5.12.0") set(KF5_MIN_VERSION "5.66.0") 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 ) 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(KDEClangFormat) 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 ) # required frameworks by Core find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config ConfigWidgets CoreAddons Crash GlobalAccel I18n IconThemes IdleTime 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 ) # optional frameworks find_package(KF5Activities ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5Activities PROPERTIES 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 ) 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" ) 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}) 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" ) find_package(epoxy) 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) find_library(DL_LIBRARY dl) 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" ) 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) 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" ) 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 "https://www.freedesktop.org/wiki/Software/systemd/" 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) 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) 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) 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 ) 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 ) 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 ) # 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." ) find_package(Fontconfig REQUIRED) set_package_properties(Fontconfig PROPERTIES 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) 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) ########### 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) endif() add_subdirectory(data) add_subdirectory(effects) add_subdirectory(scripts) add_subdirectory(tabbox) add_subdirectory(scripting) add_subdirectory(helpers) ########### next target ############### set(kwin_SRCS abstract_client.cpp abstract_opengl_context_attribute_builder.cpp abstract_output.cpp abstract_wayland_output.cpp activation.cpp appmenu.cpp atoms.cpp client_machine.cpp colorcorrection/clockskewnotifier.cpp colorcorrection/clockskewnotifierengine.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 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 linux_dmabuf.cpp logind.cpp main.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 sm.cpp thumbnailitem.cpp toplevel.cpp touch_hide_cursor_spy.cpp tablet_input.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 x11client.cpp x11eventfilter.cpp xcbutils.cpp xdgshellclient.cpp xkb.cpp xwl/xwayland_interface.cpp ) if (CMAKE_SYSTEM_NAME MATCHES "Linux") set(kwin_SRCS ${kwin_SRCS} colorcorrection/clockskewnotifierengine_linux.cpp ) endif() include(ECMQtDeclareLoggingCategory) ecm_qt_declare_logging_category(kwin_SRCS HEADER colorcorrect_logging.h IDENTIFIER KWIN_COLORCORRECTION CATEGORY_NAME kwin_colorcorrection DEFAULT_SEVERITY Critical ) if (KWIN_BUILD_TABBOX) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) set(kwin_SRCS ${kwin_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_SRCS ${kwin_SRCS} activities.cpp ) endif() if (HAVE_LINUX_VT_H) set(kwin_SRCS ${kwin_SRCS} virtual_terminal.cpp ) endif() kconfig_add_kcfg_files(kwin_SRCS settings.kcfgc) kconfig_add_kcfg_files(kwin_SRCS colorcorrection/colorcorrect_settings.kcfgc) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager) qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface) qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface) qt5_add_dbus_interface(kwin_SRCS org.kde.kappmenu.xml appmenu_interface) ki18n_wrap_ui(kwin_SRCS debug_console.ui shortcutdialog.ui ) ########### target link libraries ############### set(kwin_OWN_LIBS kwineffects kwin4_effect_builtins ) set(kwin_QT_LIBS Qt5::Concurrent Qt5::DBus Qt5::Quick Qt5::Script Qt5::Sensors ) set(kwin_KDE_LIBS KF5::ConfigCore KF5::ConfigWidgets KF5::CoreAddons KF5::GlobalAccel KF5::GlobalAccelPrivate KF5::I18n KF5::Notifications KF5::Package KF5::Plasma KF5::QuickAddons KF5::WindowSystem KDecoration2::KDecoration KDecoration2::KDecoration2Private 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) 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_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}) add_executable(kwin_x11 main_x11.cpp) target_link_libraries(kwin_x11 kwin KF5::Crash Qt5::X11Extras) install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) 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}) 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 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 the KWin/Script service type 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) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 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 bfb0f7894..5ce280704 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -1,427 +1,427 @@ 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) add_executable(testScreenPaintData ${testScreenPaintData_SRCS}) 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) add_executable(testWindowPaintData ${testWindowPaintData_SRCS}) 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 ../virtualdesktops.cpp test_virtual_desktops.cpp ) add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS}) target_link_libraries(testVirtualDesktops Qt5::Test Qt5::Widgets KF5::ConfigCore KF5::GlobalAccel KF5::I18n KF5::WaylandServer KF5::WindowSystem ) add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops) ecm_mark_as_test(testVirtualDesktops) ######################################################## # Test ClientMachine ######################################################## set(testClientMachine_SRCS ../client_machine.cpp test_client_machine.cpp ) add_executable(testClientMachine ${testClientMachine_SRCS}) set_target_properties(testClientMachine PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testClientMachine Qt5::Concurrent Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem XCB::XCB XCB::XFIXES ${X11_X11_LIB} # to make jenkins happy ) add_test(NAME kwin-testClientMachine COMMAND testClientMachine) ecm_mark_as_test(testClientMachine) ######################################################## # Test XcbWrapper ######################################################## set(testXcbWrapper_SRCS test_xcb_wrapper.cpp ) add_executable(testXcbWrapper ${testXcbWrapper_SRCS}) target_link_libraries(testXcbWrapper Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem 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) set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testXcbSizeHints Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem 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 ) add_executable(testXcbWindow ${testXcbWindow_SRCS}) target_link_libraries(testXcbWindow Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem XCB::XCB ) add_test(NAME kwin-testXcbWindow COMMAND testXcbWindow) ecm_mark_as_test(testXcbWindow) ######################################################## # Test BuiltInEffectLoader ######################################################## set(testBuiltInEffectLoader_SRCS ../effectloader.cpp mock_effectshandler.cpp test_builtin_effectloader.cpp ) add_executable(testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS}) set_target_properties(testBuiltInEffectLoader PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testBuiltInEffectLoader Qt5::Concurrent Qt5::Test Qt5::X11Extras KF5::Package kwineffects kwin4_effect_builtins ) add_test(NAME kwin-testBuiltInEffectLoader COMMAND testBuiltInEffectLoader) ecm_mark_as_test(testBuiltInEffectLoader) ######################################################## # Test ScriptedEffectLoader ######################################################## -include_directories(${KWIN_SOURCE_DIR}) +include_directories(${KWin_SOURCE_DIR}) 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 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}) target_link_libraries(testScriptedEffectLoader 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 ) add_test(NAME kwin-testScriptedEffectLoader COMMAND testScriptedEffectLoader) ecm_mark_as_test(testScriptedEffectLoader) ######################################################## # Test PluginEffectLoader ######################################################## set(testPluginEffectLoader_SRCS ../effectloader.cpp mock_effectshandler.cpp test_plugin_effectloader.cpp ) add_executable(testPluginEffectLoader ${testPluginEffectLoader_SRCS}) target_link_libraries(testPluginEffectLoader Qt5::Concurrent Qt5::Test Qt5::X11Extras KF5::Package kwineffects kwin4_effect_builtins ) 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 ../orientation_sensor.cpp ../screens.cpp ../x11eventfilter.cpp mock_abstract_client.cpp mock_screens.cpp mock_workspace.cpp mock_x11client.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) add_executable(testScreens ${testScreens_SRCS}) target_include_directories(testScreens BEFORE PRIVATE ./) target_link_libraries(testScreens Qt5::DBus Qt5::Sensors Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::ConfigGui KF5::I18n KF5::Notifications KF5::WindowSystem ) add_test(NAME kwin_testScreens COMMAND testScreens) ecm_mark_as_test(testScreens) ######################################################## # Test ScreenEdges ######################################################## set(testScreenEdges_SRCS ../atoms.cpp ../gestures.cpp ../orientation_sensor.cpp ../plugins/platforms/x11/standalone/edge.cpp ../screenedge.cpp ../screens.cpp ../virtualdesktops.cpp ../xcbutils.cpp # init of extensions mock_abstract_client.cpp mock_screens.cpp mock_workspace.cpp mock_x11client.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) 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::GlobalAccel KF5::I18n KF5::Notifications KF5::WaylandServer KF5::WindowSystem 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 ../input_event_spy.cpp ../onscreennotification.cpp onscreennotificationtest.cpp ) add_executable(testOnScreenNotification ${testOnScreenNotification_SRCS}) target_link_libraries(testOnScreenNotification Qt5::DBus Qt5::Quick Qt5::Test Qt5::Widgets # QAction include KF5::ConfigCore ) add_test(NAME kwin-testOnScreenNotification COMMAND testOnScreenNotification) ecm_mark_as_test(testOnScreenNotification) ######################################################## # Test Gestures ######################################################## set(testGestures_SRCS ../gestures.cpp test_gestures.cpp ) 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 KF5::CoreAddons Qt5::Test kwin ) add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate) ecm_mark_as_test(testX11TimestampUpdate) set(testOpenGLContextAttributeBuilder_SRCS ../abstract_opengl_context_attribute_builder.cpp ../egl_context_attribute_builder.cpp opengl_context_attribute_builder_test.cpp ) 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 ../xkb.cpp test_xkb.cpp ) add_executable(testXkb ${testXkb_SRCS}) target_link_libraries(testXkb Qt5::Gui Qt5::Test Qt5::Widgets KF5::ConfigCore KF5::WaylandServer KF5::WindowSystem XKB::XKB ) add_test(NAME kwin-testXkb COMMAND testXkb) ecm_mark_as_test(testXkb) 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::DBus Qt5::Test ) add_test(NAME kwin-testVirtualKeyboardDBus COMMAND testVirtualKeyboardDBus) ecm_mark_as_test(testVirtualKeyboardDBus) diff --git a/autotests/tabbox/CMakeLists.txt b/autotests/tabbox/CMakeLists.txt index 413c52d1c..1f148bca8 100644 --- a/autotests/tabbox/CMakeLists.txt +++ b/autotests/tabbox/CMakeLists.txt @@ -1,100 +1,100 @@ -include_directories(${KWIN_SOURCE_DIR}) +include_directories(${KWin_SOURCE_DIR}) add_definitions(-DKWIN_UNIT_TEST) ######################################################## # Test TabBox::ClientModel ######################################################## 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}) set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testTabBoxClientModel Qt5::Core Qt5::DBus Qt5::Quick Qt5::Script Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::I18n KF5::Package KF5::WindowSystem 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/tabbox_logging.cpp ../../tabbox/tabboxconfig.cpp ../../tabbox/tabboxhandler.cpp mock_tabboxclient.cpp mock_tabboxhandler.cpp test_tabbox_handler.cpp ) add_executable(testTabBoxHandler ${testTabBoxHandler_SRCS}) set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") target_link_libraries(testTabBoxHandler Qt5::Core Qt5::DBus Qt5::Quick Qt5::Script Qt5::Test Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::I18n KF5::Package KF5::WindowSystem XCB::XCB ) add_test(NAME kwin-testTabBoxHandler COMMAND testTabBoxHandler) ecm_mark_as_test(testTabBoxHandler) ######################################################## # Test TabBox::TabBoxConfig ######################################################## 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_test(NAME kwin-testTabBoxConfig COMMAND testTabBoxConfig) ecm_mark_as_test(testTabBoxConfig) ######################################################## # Test TabBox::DesktopChainManager ######################################################## 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_test(NAME kwin-testDesktopChain COMMAND testDesktopChain) ecm_mark_as_test(testDesktopChain) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index bbd722039..f56c39dad 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -1,206 +1,206 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kwin_effects\" -DEFFECT_BUILTINS) -include_directories(${KWIN_SOURCE_DIR}) # for xcbutils.h +include_directories(${KWin_SOURCE_DIR}) # for xcbutils.h set(kwin_effect_OWN_LIBS kwineffects ) 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::IconThemes KF5::Notifications # screenshot effect KF5::Plasma # screenedge effect 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::IMAGE XCB::XCB XCB::XFIXES ) 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_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) 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 OUTPUT_NAME ${KWIN_NAME}4_effect_${name}) install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS}) endmacro() # Install the KWin/Effect service type install(FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) # Create initial variables set(kwin4_effect_include_directories) 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 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) kconfig_add_kcfg_files(kwin4_effect_builtins_sources blur/blurconfig.kcfgc coverswitch/coverswitchconfig.kcfgc cube/cubeconfig.kcfgc cubeslide/cubeslideconfig.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) install_scripted_effect(sessionquit) ############################################################################### # 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) # 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 the builtins plugin kwin4_add_effect(builtins ${kwin4_effect_builtins_sources}) diff --git a/kcmkwin/common/CMakeLists.txt b/kcmkwin/common/CMakeLists.txt index f6e211a54..b41eab676 100644 --- a/kcmkwin/common/CMakeLists.txt +++ b/kcmkwin/common/CMakeLists.txt @@ -1,32 +1,32 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwincommon\") -include_directories(${KWIN_SOURCE_DIR}/effects) +include_directories(${KWin_SOURCE_DIR}/effects) set(kcmkwincommon_SRC effectsmodel.cpp ) qt5_add_dbus_interface(kcmkwincommon_SRC - ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface + ${KWin_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface ) add_library(kcmkwincommon SHARED ${kcmkwincommon_SRC}) target_link_libraries(kcmkwincommon Qt5::Core Qt5::DBus KF5::CoreAddons KF5::ConfigCore KF5::I18n KF5::Package KF5::KCMUtils kwin4_effect_builtins ) set_target_properties(kcmkwincommon PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) install(TARGETS kcmkwincommon ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) diff --git a/kcmkwin/kwincompositing/CMakeLists.txt b/kcmkwin/kwincompositing/CMakeLists.txt index 0a9b230b5..d759e202b 100644 --- a/kcmkwin/kwincompositing/CMakeLists.txt +++ b/kcmkwin/kwincompositing/CMakeLists.txt @@ -1,35 +1,35 @@ ######################################################################### # 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 ) qt5_add_dbus_interface(kwincomposing_SRC - ${KWIN_SOURCE_DIR}/org.kde.kwin.Compositing.xml kwin_compositing_interface + ${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::ConfigCore KF5::CoreAddons KF5::I18n KF5::KCMUtils ) install(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES kwincompositing.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/kcmkwin/kwinoptions/CMakeLists.txt b/kcmkwin/kwinoptions/CMakeLists.txt index dd7551fd7..eb071daad 100644 --- a/kcmkwin/kwinoptions/CMakeLists.txt +++ b/kcmkwin/kwinoptions/CMakeLists.txt @@ -1,36 +1,36 @@ ########### next target ############### # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwm\") set(kcm_kwinoptions_PART_SRCS - ${KWIN_SOURCE_DIR}/effects/effect_builtins.cpp + ${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) +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 files ############### install( FILES kwinactions.desktop kwinadvanced.desktop kwinfocus.desktop kwinmoving.desktop kwinoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index 6b8b6817b..4210ad157 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -1,35 +1,35 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinscreenedges\") -include_directories(${KWIN_SOURCE_DIR}/effects) +include_directories(${KWin_SOURCE_DIR}/effects) 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}) set(kcm_screenedges_LIBS Qt5::DBus KF5::Completion KF5::ConfigCore KF5::ConfigWidgets KF5::I18n KF5::Package KF5::Plasma KF5::Service kwin4_effect_builtins ) 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}) install(FILES kwinscreenedges.desktop kwintouchscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/kcmkwin/kwintabbox/CMakeLists.txt b/kcmkwin/kwintabbox/CMakeLists.txt index 34a41731e..25e190f76 100644 --- a/kcmkwin/kwintabbox/CMakeLists.txt +++ b/kcmkwin/kwintabbox/CMakeLists.txt @@ -1,41 +1,41 @@ # 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 - ${KWIN_SOURCE_DIR}/tabbox/tabboxconfig.cpp + ${KWin_SOURCE_DIR}/tabbox/tabboxconfig.cpp layoutpreview.cpp main.cpp thumbnailitem.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) +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::Completion KF5::GlobalAccel KF5::I18n KF5::KCMUtils KF5::NewStuff KF5::Package KF5::Service XCB::XCB kwin4_effect_builtins ) 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}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a0f9a1aaa..1304e40b0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,47 +1,47 @@ 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}) set(libinputtest_SRCS - ${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 + ${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 ../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) add_executable(orientationtest ${orientationtest_SRCS}) target_link_libraries(orientationtest Qt5::DBus Qt5::Widgets Qt5::Sensors KF5::ConfigCore KF5::Notifications KF5::I18n)