summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-09-22 12:29:17 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-09-22 14:43:53 +0200
commitd7f0f4844554f94665de97daf73efa6c0e56df6e (patch)
tree2dab2af77d4d3c2900dd01f4befff9caac05f483
parent53a08ca23554c72cbcb1d84db0544d24c127d510 (diff)
downloadqtwayland-d7f0f4844554f94665de97daf73efa6c0e56df6e.tar.gz
Re-visit the xkbcommon dependency
QtGui doesn't expose xkbcommon as public dependency anymore. QtGuiPrivate, however does now, but only in the CMake build. Fix the qmake build by adding an explicit xkbcommon dependency to client.pro, like it's done for the compositor. Commented out the explicit xkbcommon dependencies in the CMakeLists.txt files of client and compositor. Mark the XKB packages as optional, such that qtwayland can actually be built if the feature xkbcommon is OFF and no libxkbcommon-dev package is installed. Change-Id: Ia1c7a8333dc8a93b4924e03f7f2284a709a9d65b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--src/client/.prev_CMakeLists.txt5
-rw-r--r--src/client/CMakeLists.txt10
-rw-r--r--src/client/client.pro2
-rw-r--r--src/client/configure.cmake2
-rw-r--r--src/compositor/CMakeLists.txt13
-rw-r--r--src/compositor/configure.cmake2
6 files changed, 28 insertions, 6 deletions
diff --git a/src/client/.prev_CMakeLists.txt b/src/client/.prev_CMakeLists.txt
index 454b06ae..142a8a27 100644
--- a/src/client/.prev_CMakeLists.txt
+++ b/src/client/.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/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 62bc7e09..b72dbb36 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/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/client/client.pro b/src/client/client.pro
index da6a926d..5a071d9e 100644
--- a/src/client/client.pro
+++ b/src/client/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/client/configure.cmake b/src/client/configure.cmake
index 62da9940..201f5d46 100644
--- a/src/client/configure.cmake
+++ b/src/client/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
diff --git a/src/compositor/CMakeLists.txt b/src/compositor/CMakeLists.txt
index 1b07b4c6..4c1e5150 100644
--- a/src/compositor/CMakeLists.txt
+++ b/src/compositor/CMakeLists.txt
@@ -164,10 +164,15 @@ qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_wayland_datadevice
wayland_wrapper/qwldatasource.cpp wayland_wrapper/qwldatasource_p.h
)
-qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_xkbcommon
- PUBLIC_LIBRARIES
- XKB::XKB
-)
+# special case begin
+#
+# Do not explicitly add XKB::XKB. This is already done by Qt::GuiPrivate.
+#
+#qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_xkbcommon
+# PUBLIC_LIBRARIES
+# XKB::XKB
+#)
+# special case end
qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_im
SOURCES
diff --git a/src/compositor/configure.cmake b/src/compositor/configure.cmake
index 3c40f340..9c5864e3 100644
--- a/src/compositor/configure.cmake
+++ b/src/compositor/configure.cmake
@@ -25,7 +25,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()