Install KWaylandServer headers

There are use cases for the headers to be used, e.g. when implementing
wayland-specific workflows from an Effect.
In order to be able to use these, we also need to expose libkwin to be
imported as it carries the interfaces' symbols.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
Aleix Pol Gonzalez 2023-06-19 13:19:29 +02:00 committed by Aleix Pol Gonzalez
parent 6fd1867681
commit 49a76ea772
20 changed files with 172 additions and 45 deletions

View file

@ -38,6 +38,7 @@ include(ECMOptionalAddSubdirectory)
include(ECMConfiguredInstall) include(ECMConfiguredInstall)
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
include(ECMSetupQtPluginMacroNames) include(ECMSetupQtPluginMacroNames)
include(ECMSetupVersion)
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON) option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON) option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)

View file

@ -167,6 +167,7 @@ add_executable(testX11TimestampUpdate test_x11_timestamp_update.cpp)
target_link_libraries(testX11TimestampUpdate target_link_libraries(testX11TimestampUpdate
KF6::CoreAddons KF6::CoreAddons
Qt::Test Qt::Test
Qt::GuiPrivate
kwin kwin
) )
add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate) add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate)

View file

@ -40,6 +40,7 @@ target_link_libraries(LibDrmTest
XCB::XCB XCB::XCB
PkgConfig::Libxcvt PkgConfig::Libxcvt
gbm::gbm gbm::gbm
Libdrm::Libdrm
kwin kwin
) )
target_include_directories(LibDrmTest target_include_directories(LibDrmTest

View file

@ -31,6 +31,7 @@ target_link_libraries(KWinIntegrationTestFramework
Qt::Test Qt::Test
KF6::WaylandClient KF6::WaylandClient
Wayland::Client Wayland::Client
Libdrm::Libdrm
kwin kwin
PRIVATE PRIVATE
@ -43,6 +44,9 @@ target_link_libraries(KWinIntegrationTestFramework
KF6WindowSystemKWinPlugin KF6WindowSystemKWinPlugin
KF6IdleTimeKWinPlugin KF6IdleTimeKWinPlugin
) )
if(TARGET PW::KScreenLocker)
target_link_libraries(KWinIntegrationTestFramework PUBLIC PW::KScreenLocker)
endif()
function(integrationTest) function(integrationTest)
set(optionArgs BUILTIN_EFFECTS) set(optionArgs BUILTIN_EFFECTS)
@ -57,35 +61,35 @@ function(integrationTest)
add_test(NAME kwin-${ARGS_NAME} COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME}) add_test(NAME kwin-${ARGS_NAME} COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME})
endfunction() endfunction()
integrationTest(NAME testDontCrashGlxgears SRCS dont_crash_glxgears.cpp) integrationTest(NAME testDontCrashGlxgears SRCS dont_crash_glxgears.cpp LIBS KDecoration2::KDecoration)
if (KWIN_BUILD_SCREENLOCKER) if (KWIN_BUILD_SCREENLOCKER)
integrationTest(NAME testLockScreen SRCS lockscreen.cpp) integrationTest(NAME testLockScreen SRCS lockscreen.cpp LIBS KF6::GlobalAccel)
endif() endif()
integrationTest(NAME testDecorationInput SRCS decoration_input_test.cpp) integrationTest(NAME testDecorationInput SRCS decoration_input_test.cpp LIBS KDecoration2::KDecoration KDecoration2::KDecoration2Private)
integrationTest(NAME testInternalWindow SRCS internal_window.cpp) integrationTest(NAME testInternalWindow SRCS internal_window.cpp)
integrationTest(NAME testTouchInput SRCS touch_input_test.cpp) integrationTest(NAME testTouchInput SRCS touch_input_test.cpp)
integrationTest(NAME testInputStackingOrder SRCS input_stacking_order.cpp) integrationTest(NAME testInputStackingOrder SRCS input_stacking_order.cpp)
integrationTest(NAME testPointerInput SRCS pointer_input.cpp) integrationTest(NAME testPointerInput SRCS pointer_input.cpp LIBS Libdrm::Libdrm XCB::ICCCM)
integrationTest(NAME testPlatformCursor SRCS platformcursor.cpp) integrationTest(NAME testPlatformCursor SRCS platformcursor.cpp)
integrationTest(NAME testDontCrashCancelAnimation SRCS dont_crash_cancel_animation.cpp) integrationTest(NAME testDontCrashCancelAnimation SRCS dont_crash_cancel_animation.cpp LIBS KDecoration2::KDecoration)
integrationTest(NAME testTransientPlacement SRCS transient_placement.cpp) integrationTest(NAME testTransientPlacement SRCS transient_placement.cpp)
integrationTest(NAME testDebugConsole SRCS debug_console_test.cpp) integrationTest(NAME testDebugConsole SRCS debug_console_test.cpp)
integrationTest(NAME testDontCrashEmptyDeco SRCS dont_crash_empty_deco.cpp) integrationTest(NAME testDontCrashEmptyDeco SRCS dont_crash_empty_deco.cpp LIBS KDecoration2::KDecoration)
integrationTest(NAME testPlasmaSurface SRCS plasma_surface_test.cpp) integrationTest(NAME testPlasmaSurface SRCS plasma_surface_test.cpp)
integrationTest(NAME testMaximized SRCS maximize_test.cpp) integrationTest(NAME testMaximized SRCS maximize_test.cpp LIBS KDecoration2::KDecoration KF6::Package)
integrationTest(NAME testXdgShellWindow SRCS xdgshellwindow_test.cpp) integrationTest(NAME testXdgShellWindow SRCS xdgshellwindow_test.cpp LIBS KDecoration2::KDecoration)
integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp) integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp)
integrationTest(NAME testSceneOpenGL SRCS scene_opengl_test.cpp ) integrationTest(NAME testSceneOpenGL SRCS scene_opengl_test.cpp )
integrationTest(NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp ) integrationTest(NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp )
integrationTest(NAME testScreenChanges SRCS screen_changes_test.cpp) integrationTest(NAME testScreenChanges SRCS screen_changes_test.cpp)
integrationTest(NAME testModiferOnlyShortcut SRCS modifier_only_shortcut_test.cpp) integrationTest(NAME testModiferOnlyShortcut SRCS modifier_only_shortcut_test.cpp LIBS XKB::XKB)
if (KWIN_BUILD_TABBOX) if (KWIN_BUILD_TABBOX)
integrationTest(NAME testTabBox SRCS tabbox_test.cpp) integrationTest(NAME testTabBox SRCS tabbox_test.cpp)
endif() endif()
integrationTest(NAME testWindowSelection SRCS window_selection_test.cpp) integrationTest(NAME testWindowSelection SRCS window_selection_test.cpp)
integrationTest(NAME testPointerConstraints SRCS pointer_constraints_test.cpp) integrationTest(NAME testPointerConstraints SRCS pointer_constraints_test.cpp)
integrationTest(NAME testKeyboardLayout SRCS keyboard_layout_test.cpp) integrationTest(NAME testKeyboardLayout SRCS keyboard_layout_test.cpp LIBS KF6::GlobalAccel XKB::XKB)
integrationTest(NAME testKeymapCreationFailure SRCS keymap_creation_failure_test.cpp) integrationTest(NAME testKeymapCreationFailure SRCS keymap_creation_failure_test.cpp LIBS KF6::GlobalAccel)
integrationTest(NAME testShowingDesktop SRCS showing_desktop_test.cpp) integrationTest(NAME testShowingDesktop SRCS showing_desktop_test.cpp)
integrationTest(NAME testDontCrashUseractionsMenu SRCS dont_crash_useractions_menu.cpp) integrationTest(NAME testDontCrashUseractionsMenu SRCS dont_crash_useractions_menu.cpp)
integrationTest(NAME testKWinBindings SRCS kwinbindings_test.cpp) integrationTest(NAME testKWinBindings SRCS kwinbindings_test.cpp)
@ -94,26 +98,26 @@ integrationTest(NAME testVirtualDesktop SRCS virtual_desktop_test.cpp)
integrationTest(NAME testXdgShellWindowRules SRCS xdgshellwindow_rules_test.cpp) integrationTest(NAME testXdgShellWindowRules SRCS xdgshellwindow_rules_test.cpp)
integrationTest(NAME testIdleInhibition SRCS idle_inhibition_test.cpp) integrationTest(NAME testIdleInhibition SRCS idle_inhibition_test.cpp)
integrationTest(NAME testDontCrashReinitializeCompositor SRCS dont_crash_reinitialize_compositor.cpp BUILTIN_EFFECTS) integrationTest(NAME testDontCrashReinitializeCompositor SRCS dont_crash_reinitialize_compositor.cpp BUILTIN_EFFECTS)
integrationTest(NAME testNoGlobalShortcuts SRCS no_global_shortcuts_test.cpp) integrationTest(NAME testNoGlobalShortcuts SRCS no_global_shortcuts_test.cpp LIBS KF6::GlobalAccel)
integrationTest(NAME testPlacement SRCS placement_test.cpp) integrationTest(NAME testPlacement SRCS placement_test.cpp)
integrationTest(NAME testActivation SRCS activation_test.cpp) integrationTest(NAME testActivation SRCS activation_test.cpp)
integrationTest(NAME testInputMethod SRCS inputmethod_test.cpp) integrationTest(NAME testInputMethod SRCS inputmethod_test.cpp LIBS XKB::XKB)
integrationTest(NAME testScreens SRCS screens_test.cpp) integrationTest(NAME testScreens SRCS screens_test.cpp)
integrationTest(NAME testScreenEdges SRCS screenedges_test.cpp) integrationTest(NAME testScreenEdges SRCS screenedges_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testOutputChanges SRCS outputchanges_test.cpp) integrationTest(NAME testOutputChanges SRCS outputchanges_test.cpp)
integrationTest(NAME testTiles SRCS tiles_test.cpp) integrationTest(NAME testTiles SRCS tiles_test.cpp)
integrationTest(NAME testFractionalScaling SRCS fractional_scaling_test.cpp) integrationTest(NAME testFractionalScaling SRCS fractional_scaling_test.cpp)
integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testStruts SRCS struts_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testStruts SRCS struts_test.cpp LIBS XCB::ICCCM KDecoration2::KDecoration)
integrationTest(NAME testShade SRCS shade_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testShade SRCS shade_test.cpp LIBS XCB::ICCCM KDecoration2::KDecoration)
integrationTest(NAME testDontCrashAuroraeDestroyDeco SRCS dont_crash_aurorae_destroy_deco.cpp LIBS XCB::ICCCM) integrationTest(NAME testDontCrashAuroraeDestroyDeco SRCS dont_crash_aurorae_destroy_deco.cpp LIBS XCB::ICCCM KDecoration2::KDecoration)
integrationTest(NAME testPlasmaWindow SRCS plasmawindow_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testPlasmaWindow SRCS plasmawindow_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testX11DesktopWindow SRCS desktop_window_x11_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testX11DesktopWindow SRCS desktop_window_x11_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testXwaylandInput SRCS xwayland_input_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testXwaylandInput SRCS xwayland_input_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testWindowRules SRCS window_rules_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testWindowRules SRCS window_rules_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testX11Window SRCS x11_window_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testX11Window SRCS x11_window_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testQuickTiling SRCS quick_tiling_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testQuickTiling SRCS quick_tiling_test.cpp LIBS XCB::ICCCM KDecoration2::KDecoration)
integrationTest(NAME testGlobalShortcuts SRCS globalshortcuts_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testGlobalShortcuts SRCS globalshortcuts_test.cpp LIBS XCB::ICCCM KF6::GlobalAccel XKB::XKB)
integrationTest(NAME testStackingOrder SRCS stacking_order_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testStackingOrder SRCS stacking_order_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testDbusInterface SRCS dbus_interface_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testDbusInterface SRCS dbus_interface_test.cpp LIBS XCB::ICCCM)
integrationTest(NAME testXwaylandServerCrash SRCS xwaylandserver_crash_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testXwaylandServerCrash SRCS xwaylandserver_crash_test.cpp LIBS XCB::ICCCM)
@ -127,7 +131,7 @@ if (TARGET K::KPipeWire)
endif() endif()
if (KWIN_BUILD_ACTIVITIES) if (KWIN_BUILD_ACTIVITIES)
integrationTest(NAME testActivities SRCS activities_test.cpp LIBS XCB::ICCCM) integrationTest(NAME testActivities SRCS activities_test.cpp LIBS XCB::ICCCM KF6::Activities)
endif() endif()
add_subdirectory(scripting) add_subdirectory(scripting)

View file

@ -1,9 +1,9 @@
integrationTest(NAME testTranslucency SRCS translucency_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS) integrationTest(NAME testTranslucency SRCS translucency_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS)
integrationTest(NAME testSlidingPopups SRCS slidingpopups_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS) integrationTest(NAME testSlidingPopups SRCS slidingpopups_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS)
integrationTest(NAME testShadeWobblyWindows SRCS wobbly_shade_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS) integrationTest(NAME testShadeWobblyWindows SRCS wobbly_shade_test.cpp LIBS XCB::ICCCM BUILTIN_EFFECTS)
integrationTest(NAME testScriptedEffects SRCS scripted_effects_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testScriptedEffects SRCS scripted_effects_test.cpp LIBS KF6::GlobalAccel BUILTIN_EFFECTS)
integrationTest(NAME testToplevelOpenCloseAnimation SRCS toplevel_open_close_animation_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testToplevelOpenCloseAnimation SRCS toplevel_open_close_animation_test.cpp BUILTIN_EFFECTS)
integrationTest(NAME testPopupOpenCloseAnimation SRCS popup_open_close_animation_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testPopupOpenCloseAnimation SRCS popup_open_close_animation_test.cpp LIBS KDecoration2::KDecoration2Private BUILTIN_EFFECTS)
integrationTest(NAME testDesktopSwitchingAnimation SRCS desktop_switching_animation_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testDesktopSwitchingAnimation SRCS desktop_switching_animation_test.cpp BUILTIN_EFFECTS)
integrationTest(NAME testMinimizeAnimation SRCS minimize_animation_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testMinimizeAnimation SRCS minimize_animation_test.cpp BUILTIN_EFFECTS)
integrationTest(NAME testMaximizeAnimation SRCS maximize_animation_test.cpp BUILTIN_EFFECTS) integrationTest(NAME testMaximizeAnimation SRCS maximize_animation_test.cpp BUILTIN_EFFECTS)

View file

@ -1,2 +1,2 @@
integrationTest(NAME testScriptingScreenEdge SRCS screenedge_test.cpp) integrationTest(NAME testScriptingScreenEdge SRCS screenedge_test.cpp)
integrationTest(NAME testMinimizeAllScript SRCS minimizeall_test.cpp) integrationTest(NAME testMinimizeAllScript SRCS minimizeall_test.cpp LIBS KF6::Package)

View file

@ -1,3 +1,9 @@
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KWIN
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KWinConfigVersion.cmake"
SOVERSION ${PROJECT_VERSION_MAJOR}
)
# for things that are also used by kwin libraries # for things that are also used by kwin libraries
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h) configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h)
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)
@ -18,6 +24,7 @@ if (KWIN_BUILD_KCMS)
endif() endif()
add_library(kwin SHARED) add_library(kwin SHARED)
target_include_directories(kwin INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/kwin>")
set_target_properties(kwin PROPERTIES set_target_properties(kwin PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR} SOVERSION ${PROJECT_VERSION_MAJOR}
@ -187,19 +194,25 @@ target_sources(kwin PRIVATE
) )
target_link_libraries(kwin target_link_libraries(kwin
PUBLIC
kwineffects kwineffects
kwinglutils kwinglutils
Qt::Concurrent Qt::Concurrent
Qt::DBus Qt::DBus
Qt::Quick Qt::Quick
Qt::Widgets
Wayland::Server
KF6::I18n
PRIVATE
KF6::ConfigCore KF6::ConfigCore
KF6::ConfigWidgets KF6::ConfigWidgets
KF6::CoreAddons KF6::CoreAddons
KF6::Crash KF6::Crash
KF6::GlobalAccel KF6::GlobalAccel
KF6::I18n
KF6::Package KF6::Package
KF6::Service KF6::Service
KF6::WindowSystem KF6::WindowSystem
@ -230,13 +243,12 @@ target_link_libraries(kwin
epoxy::epoxy epoxy::epoxy
Threads::Threads Threads::Threads
Wayland::Server
lcms2::lcms2 lcms2::lcms2
PkgConfig::libdisplayinfo PkgConfig::libdisplayinfo
) )
if (KWIN_BUILD_NOTIFICATIONS) if (KWIN_BUILD_NOTIFICATIONS)
target_link_libraries(kwin KF6::Notifications) target_link_libraries(kwin PRIVATE KF6::Notifications)
endif() endif()
kconfig_add_kcfg_files(kwin kconfig_add_kcfg_files(kwin
@ -280,12 +292,12 @@ add_subdirectory(xwayland)
if (KWIN_BUILD_ACTIVITIES) if (KWIN_BUILD_ACTIVITIES)
target_sources(kwin PRIVATE activities.cpp) target_sources(kwin PRIVATE activities.cpp)
target_link_libraries(kwin KF6::Activities) target_link_libraries(kwin PRIVATE KF6::Activities)
endif() endif()
if (KWIN_BUILD_SCREENLOCKER) if (KWIN_BUILD_SCREENLOCKER)
target_sources(kwin PRIVATE screenlockerwatcher.cpp) target_sources(kwin PRIVATE screenlockerwatcher.cpp)
target_link_libraries(kwin PW::KScreenLocker) target_link_libraries(kwin PRIVATE PW::KScreenLocker)
endif() endif()
if (KWIN_BUILD_TABBOX) if (KWIN_BUILD_TABBOX)
@ -298,7 +310,7 @@ if (KWIN_BUILD_TABBOX)
tabbox/tabboxhandler.cpp tabbox/tabboxhandler.cpp
tabbox/x11_filter.cpp tabbox/x11_filter.cpp
) )
target_link_libraries(kwin Qt::GuiPrivate) target_link_libraries(kwin PRIVATE Qt::GuiPrivate)
add_subdirectory(tabbox/switchers) add_subdirectory(tabbox/switchers)
endif() endif()
@ -311,13 +323,14 @@ add_executable(kwin_x11 main_x11.cpp)
target_link_libraries(kwin_x11 target_link_libraries(kwin_x11
KWinX11Platform KWinX11Platform
kwin kwin
KF6::GlobalAccel
) )
target_compile_definitions(kwin_x11 PRIVATE target_compile_definitions(kwin_x11 PRIVATE
-DTRANSLATION_DOMAIN=\"kwin\" -DTRANSLATION_DOMAIN=\"kwin\"
) )
kcoreaddons_target_static_plugins(kwin_x11 "kwin/effects/plugins") kcoreaddons_target_static_plugins(kwin_x11 "kwin/effects/plugins")
install(TARGETS kwin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) install(TARGETS kwin EXPORT KWinTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
install(TARGETS kwin_x11 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kwin_x11 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
add_executable(kwin_wayland main_wayland.cpp) add_executable(kwin_wayland main_wayland.cpp)
@ -325,6 +338,7 @@ add_executable(kwin_wayland main_wayland.cpp)
target_link_libraries(kwin_wayland target_link_libraries(kwin_wayland
kwin kwin
KWinXwaylandServerModule KWinXwaylandServerModule
KF6::Crash
) )
target_compile_definitions(kwin_wayland PRIVATE target_compile_definitions(kwin_wayland PRIVATE
-DTRANSLATION_DOMAIN=\"kwin\" -DTRANSLATION_DOMAIN=\"kwin\"
@ -373,3 +387,28 @@ install(
${KDE_INSTALL_DBUSINTERFACEDIR} ${KDE_INSTALL_DBUSINTERFACEDIR}
) )
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin COMPONENT Devel) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin COMPONENT Devel)
install(EXPORT KWinTargets DESTINATION "${KDE_INSTALL_CMAKEPACKAGEDIR}/KWin" FILE KWinTargets.cmake NAMESPACE KWin:: )
install(FILES
core/output.h
core/renderloop.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin/core COMPONENT Devel)
install(FILES
utils/edid.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin/utils COMPONENT Devel)
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KWin")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KWinConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KWinConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel )
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KWinConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KWinConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(EXPORT KWinTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KWinTargets.cmake NAMESPACE KWin:: )

12
src/KWinConfig.cmake.in Normal file
View file

@ -0,0 +1,12 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Qt@QT_MAJOR_VERSION@Core "@QT_MIN_VERSION@")
find_dependency(Qt@QT_MAJOR_VERSION@Gui "@QT_MIN_VERSION@")
find_dependency(Qt@QT_MAJOR_VERSION@Concurrent "@QT_MIN_VERSION@")
find_dependency(Qt@QT_MAJOR_VERSION@Quick "@QT_MIN_VERSION@")
find_dependency(KF6I18n "@KF6_MIN_VERSION@")
find_dependency(KWinEffects)
@PACKAGE_SETUP_KWIN_AUTOMOC_VARIABLES@
include("${CMAKE_CURRENT_LIST_DIR}/KWinTargets.cmake")

View file

@ -26,4 +26,4 @@ target_sources(kwin PRIVATE
drm_virtual_output.cpp drm_virtual_output.cpp
) )
target_link_libraries(kwin Libdrm::Libdrm gbm::gbm PkgConfig::Libxcvt) target_link_libraries(kwin PRIVATE Libdrm::Libdrm gbm::gbm PkgConfig::Libxcvt)

View file

@ -22,4 +22,4 @@ target_sources(kwin PRIVATE
libinput_logging.cpp libinput_logging.cpp
libinputbackend.cpp libinputbackend.cpp
) )
target_link_libraries(kwin Libinput::Libinput) target_link_libraries(kwin PRIVATE Libinput::Libinput)

View file

@ -7,4 +7,4 @@ target_sources(kwin PRIVATE
wayland_qpainter_backend.cpp wayland_qpainter_backend.cpp
) )
target_link_libraries(kwin KF6::WaylandClient Wayland::Client gbm::gbm) target_link_libraries(kwin PRIVATE KF6::WaylandClient Wayland::Client gbm::gbm)

View file

@ -18,7 +18,8 @@ set(X11PLATFORM_SOURCES
) )
add_library(KWinX11Platform OBJECT ${X11PLATFORM_SOURCES}) add_library(KWinX11Platform OBJECT ${X11PLATFORM_SOURCES})
target_link_libraries(KWinX11Platform kwin KF6::Crash X11::X11 XCB::XKB PkgConfig::XKBX11) target_link_libraries(KWinX11Platform kwin KF6::Crash X11::X11 XCB::XKB PkgConfig::XKBX11 Qt::GuiPrivate Libdrm::Libdrm
XCB::COMPOSITE XCB::KEYSYMS XCB::RANDR)
if (X11_Xi_FOUND) if (X11_Xi_FOUND)
target_sources(KWinX11Platform PRIVATE x11_standalone_xinputintegration.cpp) target_sources(KWinX11Platform PRIVATE x11_standalone_xinputintegration.cpp)
target_link_libraries(KWinX11Platform X11::Xi) target_link_libraries(KWinX11Platform X11::Xi)

View file

@ -7,11 +7,12 @@ target_sources(kwin PRIVATE
) )
target_link_libraries(kwin target_link_libraries(kwin
PRIVATE
X11::XCB X11::XCB
X11::X11 X11::X11
XCB::DRI3 XCB::DRI3
XCB::PRESENT XCB::PRESENT
) )
if (X11_Xi_FOUND) if (X11_Xi_FOUND)
target_link_libraries(kwin X11::Xi) target_link_libraries(kwin PRIVATE X11::Xi)
endif() endif()

View file

@ -1,6 +1,3 @@
########### next target ###############
include(ECMSetupVersion)
ecm_setup_version(${PROJECT_VERSION} ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KWINEFFECTS VARIABLE_PREFIX KWINEFFECTS
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwineffects_version.h" VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwineffects_version.h"

View file

@ -14,5 +14,4 @@ target_sources(buttonsrebind PRIVATE
main.cpp main.cpp
buttonrebindsfilter.cpp buttonrebindsfilter.cpp
) )
target_link_libraries(buttonsrebind PRIVATE kwin KF6::WindowSystem) target_link_libraries(buttonsrebind PRIVATE kwin KF6::WindowSystem XKB::XKB)

View file

@ -25,7 +25,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_sources(nightcolor PRIVATE clockskewnotifierengine_linux.cpp) target_sources(nightcolor PRIVATE clockskewnotifierengine_linux.cpp)
endif() endif()
target_link_libraries(nightcolor kwin) target_link_libraries(nightcolor kwin KF6::ConfigGui KF6::GlobalAccel)
install(FILES nightcolorsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) install(FILES nightcolorsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES org.kde.kwin.ColorCorrect.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}) install(FILES org.kde.kwin.ColorCorrect.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})

View file

@ -17,4 +17,4 @@ ecm_qt_declare_logging_category(screencast
DEFAULT_SEVERITY Warning DEFAULT_SEVERITY Warning
) )
target_link_libraries(screencast kwin PkgConfig::PipeWire) target_link_libraries(screencast kwin PkgConfig::PipeWire Libdrm::Libdrm)

View file

@ -14,5 +14,5 @@ target_sources(StickyKeysPlugin PRIVATE
main.cpp main.cpp
stickykeys.cpp stickykeys.cpp
) )
target_link_libraries(StickyKeysPlugin PRIVATE kwin KF6::WindowSystem) target_link_libraries(StickyKeysPlugin PRIVATE kwin KF6::WindowSystem XKB::XKB)

View file

@ -10,7 +10,7 @@ endif()
add_library(WaylandProtocols_xml OBJECT) add_library(WaylandProtocols_xml OBJECT)
set_property(TARGET WaylandProtocols_xml PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET WaylandProtocols_xml PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(WaylandProtocols_xml Qt::Core Wayland::Server) target_link_libraries(WaylandProtocols_xml Qt::Core Wayland::Server)
target_link_libraries(kwin WaylandProtocols_xml) target_link_libraries(kwin PRIVATE WaylandProtocols_xml)
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
PROTOCOL ${Wayland_DATADIR}/wayland.xml PROTOCOL ${Wayland_DATADIR}/wayland.xml
@ -298,3 +298,71 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
else() else()
message(FATAL_ERROR "Unsupported platform ${CMAKE_SYSTEM_NAME}") message(FATAL_ERROR "Unsupported platform ${CMAKE_SYSTEM_NAME}")
endif() endif()
install(FILES
appmenu_interface.h
blur_interface.h
compositor_interface.h
contenttype_v1_interface.h
contrast_interface.h
datacontroldevice_v1_interface.h
datacontroldevicemanager_v1_interface.h
datacontroloffer_v1_interface.h
datacontrolsource_v1_interface.h
datadevice_interface.h
datadevicemanager_interface.h
dataoffer_interface.h
datasource_interface.h
dpms_interface.h
drmlease_v1_interface.h
fakeinput_interface.h
fractionalscale_v1_interface.h
idle_interface.h
idleinhibit_v1_interface.h
idlenotify_v1_interface.h
inputmethod_v1_interface.h
keyboard_interface.h
keyboard_shortcuts_inhibit_v1_interface.h
keystate_interface.h
layershell_v1_interface.h
lockscreen_overlay_v1_interface.h
output_interface.h
output_order_v1_interface.h
outputdevice_v2_interface.h
outputmanagement_v2_interface.h
plasmashell_interface.h
plasmavirtualdesktop_interface.h
plasmawindowmanagement_interface.h
pointer_interface.h
pointerconstraints_v1_interface.h
pointergestures_v1_interface.h
primaryselectiondevice_v1_interface.h
primaryselectiondevicemanager_v1_interface.h
primaryselectionoffer_v1_interface.h
primaryselectionsource_v1_interface.h
relativepointer_v1_interface.h
screencast_v1_interface.h
screenedge_v1_interface.h
seat_interface.h
server_decoration_interface.h
server_decoration_palette_interface.h
shadow_interface.h
slide_interface.h
subcompositor_interface.h
surface_interface.h
tablet_v2_interface.h
tearingcontrol_v1_interface.h
textinput_v1_interface.h
textinput_v2_interface.h
textinput_v3_interface.h
touch_interface.h
viewporter_interface.h
xdgactivation_v1_interface.h
xdgdecoration_v1_interface.h
xdgforeign_v2_interface.h
xdgoutput_v1_interface.h
xdgshell_interface.h
xwaylandkeyboardgrab_v1_interface.h
xwaylandshell_v1_interface.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kwin/wayland COMPONENT Devel)

View file

@ -16,4 +16,7 @@ add_library(KWinXwaylandServerModule OBJECT
xwldrophandler.cpp xwldrophandler.cpp
xwaylandlauncher.cpp xwaylandlauncher.cpp
) )
target_link_libraries(KWinXwaylandServerModule PUBLIC kwin KWinXwaylandCommon) target_link_libraries(KWinXwaylandServerModule PUBLIC kwin KWinXwaylandCommon XCB::XCB XCB::RANDR XCB::XFIXES XKB::XKB)
if(TARGET KF6::Notifications)
target_link_libraries(KWinXwaylandServerModule PUBLIC KF6::Notifications)
endif()