summaryrefslogtreecommitdiffstats
path: root/src/gui/configure.cmake
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-26 10:51:30 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-26 09:07:20 +0000
commit8c60782124aa7fe54ade1f67bd85b11068735314 (patch)
tree7d308976c19623721d07b8b6b6f73393d01d9c95 /src/gui/configure.cmake
parenta9d2c5b6d7fa6b7365db8690f57aa78002c8bc4b (diff)
Fix XCB feature detection
The xcb feature controls whether to build the xcb platform plugin. The feature depends among other things on qt_find_package(XCB 1.9 PROVIDED_TARGETS XCB::XCB) to succeed. This means at the moment setting XCB_FOUND to true, that's what the condition checks. Later on, in configure.cmake, we also check for other components in the XCB package, for example: qt_find_package(XCB COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT) If this component is not available, the xcb platform plugin has perhaps reduce functionality, but it should be built and the feature should be abled. However it isn't, because when that find_package call fails, XCB_FOUND will be set to false. And that in turn will disable the feature as the condition fails. Therefore this patch changes the condition to check for the presence of the XCB::XCB target instead. Change-Id: I534087d8c3b7ff5edf81a5ffcf16cc0bb78b9fb7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/gui/configure.cmake')
-rw-r--r--src/gui/configure.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index 58f34239e4..d8cd47db49 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -103,6 +103,7 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(XRender PROVIDED_TARGETS PkgConfig::XRender)
endif()
+
#### Tests
# angle_d3d11_qdtd
@@ -766,7 +767,7 @@ qt_feature("xcb" PRIVATE
SECTION "Platform plugins"
LABEL "XCB"
AUTODETECT NOT APPLE
- CONDITION QT_FEATURE_thread AND QT_FEATURE_xkbcommon AND XCB_FOUND
+ CONDITION QT_FEATURE_thread AND QT_FEATURE_xkbcommon AND TARGET XCB::XCB
ENABLE INPUT_xcb STREQUAL 'system' OR INPUT_xcb STREQUAL 'qt' OR INPUT_xcb STREQUAL 'yes'
)
qt_feature("xcb_glx_plugin" PRIVATE