Warning, /plasma/kwin/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # for things that are also used by kwin libraries
0002 configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h)
0003 configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h)
0004 
0005 set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
0006 qt_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
0007 add_library(KWinEffectsInterface STATIC ${effects_interface_SRCS})
0008 set_property(TARGET KWinEffectsInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
0009 
0010 target_link_libraries(KWinEffectsInterface Qt::DBus)
0011 
0012 add_subdirectory(effects)
0013 add_subdirectory(scripts)
0014 add_subdirectory(tabbox)
0015 add_subdirectory(scripting)
0016 add_subdirectory(helpers)
0017 add_subdirectory(qml)
0018 
0019 add_subdirectory(libkwineffects)
0020 if (KWIN_BUILD_KCMS)
0021     add_subdirectory(kcms)
0022 endif()
0023 
0024 add_library(kwin SHARED)
0025 set_target_properties(kwin PROPERTIES
0026    VERSION ${PROJECT_VERSION}
0027    SOVERSION ${PROJECT_VERSION_MAJOR}
0028 )
0029 
0030 target_sources(kwin PRIVATE
0031     3rdparty/xcursor.c
0032     activation.cpp
0033     appmenu.cpp
0034     atoms.cpp
0035     client_machine.cpp
0036     colors/colordevice.cpp
0037     colors/colormanager.cpp
0038     composite.cpp
0039     core/colorlut.cpp
0040     core/colorpipelinestage.cpp
0041     core/colortransformation.cpp
0042     core/inputbackend.cpp
0043     core/inputdevice.cpp
0044     core/output.cpp
0045     core/outputbackend.cpp
0046     core/outputconfiguration.cpp
0047     core/outputlayer.cpp
0048     core/overlaywindow.cpp
0049     core/renderbackend.cpp
0050     core/renderjournal.cpp
0051     core/renderlayer.cpp
0052     core/renderlayerdelegate.cpp
0053     core/renderloop.cpp
0054     core/rendertarget.cpp
0055     core/session.cpp
0056     core/session_consolekit.cpp
0057     core/session_logind.cpp
0058     core/session_noop.cpp
0059     cursor.cpp
0060     cursordelegate_opengl.cpp
0061     cursordelegate_qpainter.cpp
0062     cursorsource.cpp
0063     dbusinterface.cpp
0064     debug_console.cpp
0065     decorations/decoratedclient.cpp
0066     decorations/decorationbridge.cpp
0067     decorations/decorationpalette.cpp
0068     decorations/decorations_logging.cpp
0069     decorations/settings.cpp
0070     deleted.cpp
0071     dmabuftexture.cpp
0072     dpmsinputeventfilter.cpp
0073     effectloader.cpp
0074     effects.cpp
0075     events.cpp
0076     focuschain.cpp
0077     ftrace.cpp
0078     gestures.cpp
0079     globalshortcuts.cpp
0080     group.cpp
0081     hide_cursor_spy.cpp
0082     idle_inhibition.cpp
0083     idledetector.cpp
0084     input.cpp
0085     input_event.cpp
0086     input_event_spy.cpp
0087     inputmethod.cpp
0088     inputpanelv1integration.cpp
0089     inputpanelv1window.cpp
0090     internalwindow.cpp
0091     keyboard_input.cpp
0092     keyboard_layout.cpp
0093     keyboard_layout_switching.cpp
0094     keyboard_repeat.cpp
0095     killwindow.cpp
0096     kscreenintegration.cpp
0097     layers.cpp
0098     layershellv1integration.cpp
0099     layershellv1window.cpp
0100     linux_dmabuf.cpp
0101     main.cpp
0102     modifier_only_shortcuts.cpp
0103     mousebuttons.cpp
0104     moving_client_x11_filter.cpp
0105     netinfo.cpp
0106     onscreennotification.cpp
0107     options.cpp
0108     osd.cpp
0109     outline.cpp
0110     placeholderinputeventfilter.cpp
0111     placeholderoutput.cpp
0112     placement.cpp
0113     placementtracker.cpp
0114     plugin.cpp
0115     pluginmanager.cpp
0116     pointer_input.cpp
0117     popup_input_filter.cpp
0118     rootinfo_filter.cpp
0119     rulebooksettings.cpp
0120     rules.cpp
0121     scene/cursoritem.cpp
0122     scene/cursorscene.cpp
0123     scene/decorationitem.cpp
0124     scene/dndiconitem.cpp
0125     scene/imageitem.cpp
0126     scene/item.cpp
0127     scene/itemrenderer.cpp
0128     scene/itemrenderer_opengl.cpp
0129     scene/itemrenderer_qpainter.cpp
0130     scene/scene.cpp
0131     scene/shadowitem.cpp
0132     scene/surfaceitem.cpp
0133     scene/surfaceitem_internal.cpp
0134     scene/surfaceitem_wayland.cpp
0135     scene/surfaceitem_x11.cpp
0136     scene/windowitem.cpp
0137     scene/workspacescene.cpp
0138     scene/workspacescene_opengl.cpp
0139     scene/workspacescene_qpainter.cpp
0140     screenedge.cpp
0141     scripting/dbuscall.cpp
0142     scripting/desktopbackgrounditem.cpp
0143     scripting/screenedgeitem.cpp
0144     scripting/scriptedeffect.cpp
0145     scripting/scripting.cpp
0146     scripting/scripting_logging.cpp
0147     scripting/scriptingutils.cpp
0148     scripting/tilemodel.cpp
0149     scripting/v2/clientmodel.cpp
0150     scripting/v3/clientmodel.cpp
0151     scripting/v3/virtualdesktopmodel.cpp
0152     scripting/windowthumbnailitem.cpp
0153     scripting/workspace_wrapper.cpp
0154     shadow.cpp
0155     sm.cpp
0156     syncalarmx11filter.cpp
0157     tablet_input.cpp
0158     tabletmodemanager.cpp
0159     tiles/customtile.cpp
0160     tiles/quicktile.cpp
0161     tiles/tile.cpp
0162     tiles/tilemanager.cpp
0163     touch_input.cpp
0164     unmanaged.cpp
0165     useractions.cpp
0166     virtualdesktops.cpp
0167     virtualdesktopsdbustypes.cpp
0168     virtualkeyboard_dbus.cpp
0169     was_user_interaction_x11_filter.cpp
0170     wayland_server.cpp
0171     waylandshellintegration.cpp
0172     waylandwindow.cpp
0173     window.cpp
0174     window_property_notify_x11_filter.cpp
0175     workspace.cpp
0176     x11eventfilter.cpp
0177     x11syncmanager.cpp
0178     x11window.cpp
0179     xdgactivationv1.cpp
0180     xdgshellintegration.cpp
0181     xdgshellwindow.cpp
0182     xkb.cpp
0183     xwaylandwindow.cpp
0184 )
0185 
0186 target_link_libraries(kwin
0187     kwineffects
0188     kwinglutils
0189 
0190     Qt::Concurrent
0191     Qt::DBus
0192     Qt::Quick
0193 
0194     KF5::ConfigCore
0195     KF5::ConfigWidgets
0196     KF5::CoreAddons
0197     KF5::Crash
0198     KF5::GlobalAccel
0199     KF5::GlobalAccelPrivate
0200     KF5::I18n
0201     KF5::Package
0202     KF5::Service
0203     KF5::WindowSystem
0204 
0205     KDecoration2::KDecoration
0206     KDecoration2::KDecoration2Private
0207 
0208     XCB::COMPOSITE
0209     XCB::CURSOR
0210     XCB::DAMAGE
0211     XCB::GLX
0212     XCB::ICCCM
0213     XCB::KEYSYMS
0214     XCB::RANDR
0215     XCB::RENDER
0216     XCB::SHAPE
0217     XCB::SHM
0218     XCB::SYNC
0219     XCB::XCB
0220     XCB::XFIXES
0221     XCB::XINERAMA
0222 
0223     UDev::UDev
0224     XKB::XKB
0225     EGL::EGL
0226     epoxy::epoxy
0227 
0228     Threads::Threads
0229     Wayland::Server
0230     lcms2::lcms2
0231 )
0232 if (QT_MAJOR_VERSION EQUAL "5")
0233     target_link_libraries(kwin Qt5::X11Extras Qt5::XkbCommonSupportPrivate)
0234 endif()
0235 
0236 if (KWIN_BUILD_NOTIFICATIONS)
0237     target_link_libraries(kwin KF5::Notifications)
0238 endif()
0239 
0240 kconfig_add_kcfg_files(kwin
0241     settings.kcfgc
0242     rulesettings.kcfgc
0243     rulebooksettingsbase.kcfgc
0244 )
0245 
0246 ki18n_wrap_ui(kwin
0247     debug_console.ui
0248     shortcutdialog.ui
0249 )
0250 
0251 set(kwin_dbus_SRCS)
0252 qt_add_dbus_adaptor(kwin_dbus_SRCS scripting/org.kde.kwin.Script.xml scripting/scripting.h KWin::AbstractScript)
0253 qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
0254 qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface)
0255 qt_add_dbus_adaptor(kwin_dbus_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl)
0256 qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface)
0257 qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager)
0258 qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.Plugins.xml dbusinterface.h KWin::PluginManagerDBusInterface)
0259 qt_add_dbus_interface(kwin_dbus_SRCS org.freedesktop.DBus.Properties.xml dbusproperties_interface)
0260 
0261 if (KWIN_BUILD_SCREENLOCKER)
0262     qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface)
0263     qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
0264 endif()
0265 
0266 qt_add_dbus_interface(kwin_dbus_SRCS org.kde.kappmenu.xml appmenu_interface)
0267 
0268 target_sources(kwin PRIVATE
0269     ${kwin_dbus_SRCS}
0270 )
0271 
0272 add_subdirectory(backends)
0273 add_subdirectory(utils)
0274 add_subdirectory(wayland)
0275 add_subdirectory(xwayland)
0276 
0277 if (KWIN_BUILD_ACTIVITIES)
0278     target_sources(kwin PRIVATE activities.cpp)
0279     target_link_libraries(kwin KF5::Activities)
0280 endif()
0281 
0282 if (KWIN_BUILD_SCREENLOCKER)
0283     target_sources(kwin PRIVATE screenlockerwatcher.cpp)
0284     target_link_libraries(kwin PW::KScreenLocker)
0285 endif()
0286 
0287 if (KWIN_BUILD_TABBOX)
0288     target_sources(kwin PRIVATE
0289         tabbox/clientmodel.cpp
0290         tabbox/desktopchain.cpp
0291         tabbox/desktopmodel.cpp
0292         tabbox/switcheritem.cpp
0293         tabbox/tabbox.cpp
0294         tabbox/tabbox_logging.cpp
0295         tabbox/tabboxconfig.cpp
0296         tabbox/tabboxhandler.cpp
0297         tabbox/x11_filter.cpp
0298     )
0299     target_link_libraries(kwin Qt::GuiPrivate)
0300 endif()
0301 
0302 qt_generate_dbus_interface(virtualkeyboard_dbus.h org.kde.kwin.VirtualKeyboard.xml OPTIONS -A)
0303 qt_generate_dbus_interface(tabletmodemanager.h org.kde.KWin.TabletModeManager.xml OPTIONS -A)
0304 
0305 generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
0306 
0307 add_executable(kwin_x11 main_x11.cpp)
0308 target_link_libraries(kwin_x11
0309     KWinX11Platform
0310     kwin
0311 )
0312 kcoreaddons_target_static_plugins(kwin_x11 "kwin/effects/plugins")
0313 
0314 install(TARGETS kwin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
0315 install(TARGETS kwin_x11 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0316 
0317 add_executable(kwin_wayland main_wayland.cpp)
0318 
0319 target_link_libraries(kwin_wayland
0320     kwin
0321     KWinXwaylandServerModule
0322 )
0323 kcoreaddons_target_static_plugins(kwin_wayland "kwin/effects/plugins")
0324 
0325 install(TARGETS kwin_wayland ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0326 if (HAVE_LIBCAP)
0327     install(
0328     CODE "execute_process(
0329             COMMAND
0330                 ${SETCAP_EXECUTABLE}
0331                 CAP_SYS_NICE=+ep
0332                 \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/kwin_wayland)"
0333     )
0334 endif()
0335 
0336 add_subdirectory(platformsupport)
0337 add_subdirectory(plugins)
0338 
0339 target_link_libraries(kwin_wayland
0340     KWinQpaPlugin
0341     KF5GlobalAccelKWinPlugin
0342     KF5WindowSystemKWinPlugin
0343     KF5IdleTimeKWinPlugin
0344 )
0345 
0346 add_custom_target(
0347     KWinDBusInterfaces
0348     ALL
0349     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kwin.VirtualKeyboard.xml
0350             ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KWin.TabletModeManager.xml
0351 )
0352 
0353 if (PipeWire_FOUND)
0354     target_link_libraries(kwin_wayland KWinScreencastPlugin)
0355 endif()
0356 
0357 install(FILES kwin.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
0358 if (KWIN_BUILD_NOTIFICATIONS)
0359     install(FILES kwin.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
0360 endif()
0361 install(
0362     FILES
0363         org.kde.KWin.VirtualDesktopManager.xml
0364         org.kde.KWin.xml
0365         org.kde.kwin.Compositing.xml
0366         org.kde.kwin.Effects.xml
0367         org.kde.KWin.Plugins.xml
0368         ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kwin.VirtualKeyboard.xml
0369         ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KWin.TabletModeManager.xml
0370     DESTINATION
0371         ${KDE_INSTALL_DBUSINTERFACEDIR}
0372 )
0373 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel)
0374 
0375 # Install the KWin/Script service type
0376 install(FILES scripting/kwinscript.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPESDIR})