From ac2a38d80cfd043edc1a0b0434112af008bdabb9 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 27 May 2025 16:07:19 +0200 Subject: [PATCH] Reapply: xcb: add xcb-util dependency for xcb-image xcb-image includes xcb_aux.h, which is part of xcb-util. 0.3.8 is enough for the dependency, it also make Debian 10 (Buster) satisfied. xcb-image is from xcb-util-image, which should follow same version number as xcb-util. Not sure how Debian 10(Buster) got xcb-image 0.3.9 with xcb-util 0.3.8 combination. See also https://lists.x.org/archives/xorg-announce/2012-May/date.html#1965 . This reverts 92a57e0b016f811876ec1d62328ca8edfe452a3a . Fixes: QTBUG-86287 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I838b1e06a25fa1e45470466de17cbb6b6da851a4 Reviewed-by: Alexandru Croitor --- src/gui/configure.cmake | 8 +++++++- src/plugins/platforms/xcb/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index 8dffa4623e7..e04c25bc112 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -100,10 +100,14 @@ if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS) qt_find_package(XCB 0.3.9 COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm) endif() qt_add_qmake_lib_dependency(xcb_icccm xcb) +if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS) + qt_find_package(XCB 0.3.8 COMPONENTS UTIL PROVIDED_TARGETS XCB::UTIL MODULE_NAME gui QMAKE_LIB xcb_util) +endif() +qt_add_qmake_lib_dependency(xcb_util xcb) if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS) qt_find_package(XCB 0.3.9 COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image) endif() -qt_add_qmake_lib_dependency(xcb_image xcb_shm xcb) +qt_add_qmake_lib_dependency(xcb_image xcb_shm xcb_util xcb) if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS) qt_find_package(XCB 0.3.9 COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms) endif() @@ -555,6 +559,7 @@ qt_config_compile_test(xcb_syslibs LIBRARIES XCB::CURSOR XCB::ICCCM + XCB::UTIL XCB::IMAGE XCB::KEYSYMS XCB::RANDR @@ -570,6 +575,7 @@ qt_config_compile_test(xcb_syslibs "// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++ #define explicit dont_use_cxx_explicit #include +#include #include #include #include diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt index 4fa6c1e9789..492d274c2fd 100644 --- a/src/plugins/platforms/xcb/CMakeLists.txt +++ b/src/plugins/platforms/xcb/CMakeLists.txt @@ -52,6 +52,7 @@ qt_internal_add_module(XcbQpaPrivate Qt::GuiPrivate XCB::CURSOR XCB::ICCCM + XCB::UTIL XCB::IMAGE XCB::KEYSYMS XCB::RANDR