diff --git a/src/plugins/platforms/wayland/.prev_CMakeLists.txt b/src/plugins/platforms/wayland/.prev_CMakeLists.txt index 454b06ae38f..142a8a272aa 100644 --- a/src/plugins/platforms/wayland/.prev_CMakeLists.txt +++ b/src/plugins/platforms/wayland/.prev_CMakeLists.txt @@ -89,6 +89,11 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient ## Scopes: ##################################################################### +qt_extend_target(WaylandClient CONDITION QT_FEATURE_xkbcommon + PUBLIC_LIBRARIES + XKB::XKB +) + qt_extend_target(WaylandClient CONDITION QT_FEATURE_clipboard SOURCES qwaylandclipboard.cpp qwaylandclipboard_p.h diff --git a/src/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt index 62bc7e09e9f..b72dbb36a41 100644 --- a/src/plugins/platforms/wayland/CMakeLists.txt +++ b/src/plugins/platforms/wayland/CMakeLists.txt @@ -89,6 +89,16 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient ## Scopes: ##################################################################### +# special case begin +# +# Do not explicitly add XKB::XKB. This is already done by Qt::GuiPrivate. +# +# qt_extend_target(WaylandClient CONDITION QT_FEATURE_xkbcommon +# PUBLIC_LIBRARIES +# XKB::XKB +# ) +# special case end + qt_extend_target(WaylandClient CONDITION QT_FEATURE_clipboard SOURCES qwaylandclipboard.cpp qwaylandclipboard_p.h diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index da6a926dc48..5a071d9ed93 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -14,6 +14,8 @@ CONFIG -= precompile_header CONFIG += link_pkgconfig wayland-scanner QMAKE_USE += wayland-client +qtConfig(xkbcommon): \ + QMAKE_USE += xkbcommon INCLUDEPATH += $$PWD/../shared diff --git a/src/plugins/platforms/wayland/configure.cmake b/src/plugins/platforms/wayland/configure.cmake index 62da9940b0d..201f5d46290 100644 --- a/src/plugins/platforms/wayland/configure.cmake +++ b/src/plugins/platforms/wayland/configure.cmake @@ -26,7 +26,7 @@ if(NOT TARGET X11::X11) endif() # Same for XKB. if(NOT TARGET XKB::XKB) - qt_find_package(XKB 0.5.0 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon) + qt_find_package(XKB 0.5.0 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon MARK_OPTIONAL) endif() # special case end