configure: properly atomize xcb-syslibs

as it is now cheap to test for individual libraries and headers, split
the xcb_syslibs monster-library into its parts.
the compile test remains a single blob, though, as that didn't get any
cheaper. whether it's worth keeping it in the first place is debatable.

Change-Id: Id7cae7925bb4d77069437512abecf14feea749f2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
Oswald Buddenhagen 2018-01-17 12:44:45 +01:00
parent 7a481fce28
commit 65463764f2
2 changed files with 107 additions and 27 deletions

View File

@ -557,7 +557,7 @@
]
},
"xcb": {
"label": "XCB >= 1.9 (core)",
"label": "XCB >= 1.9",
"test": {
"main": [
"int primaryScreen = 0;",
@ -572,30 +572,86 @@
"-lxcb"
]
},
"xcb_syslibs": {
"label": "XCB (extensions)",
"test": {
"include": [
"xcb/xcb.h",
"xcb/xfixes.h",
"xcb/xcb_image.h",
"xcb/xcb_keysyms.h",
"xcb/xinerama.h",
"xcb/sync.h",
"xcb/randr.h",
"xcb/shm.h",
"xcb/xcb_icccm.h"
],
"main": [
"int primaryScreen = 0;",
"(void) xcb_connect(\"\", &primaryScreen);"
]
},
"xcb_icccm": {
"label": "XCB ICCCM >= 0.3.9",
"headers": "xcb/xcb_icccm.h",
"sources": [
{ "type": "pkgConfig",
"args": "xcb xcb-shm xcb-sync xcb-xfixes xcb-xinerama xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape" },
"-lxcb -lxcb-shm -lxcb-sync -lxcb-xfixes -lxcb-xinerama -lxcb-randr -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-shape"
]
{ "type": "pkgConfig", "args": "xcb-icccm >= 0.3.9" },
"-lxcb-icccm"
],
"use": "xcb"
},
"xcb_image": {
"label": "XCB Image >= 0.3.9",
"headers": "xcb/xcb_image.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-image >= 0.3.9" },
"-lxcb-image"
],
"use": "xcb_shm xcb"
},
"xcb_keysyms": {
"label": "XCB Keysyms >= 0.3.9",
"headers": "xcb/xcb_keysyms.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-keysyms >= 0.3.9" },
"-lxcb-keysyms"
],
"use": "xcb"
},
"xcb_randr": {
"label": "XCB RandR",
"headers": "xcb/randr.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-randr" },
"-lxcb-randr"
],
"use": "xcb"
},
"xcb_shape": {
"label": "XCB Shape",
"headers": "xcb/shape.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-shape" },
"-lxcb-shape"
],
"use": "xcb"
},
"xcb_shm": {
"label": "XCB SHM",
"headers": "xcb/shm.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-shm" },
"-lxcb-shm"
],
"use": "xcb"
},
"xcb_sync": {
"label": "XCB Sync",
"headers": "xcb/sync.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-sync" },
"-lxcb-sync"
],
"use": "xcb"
},
"xcb_xfixes": {
"label": "XCB Xfixes",
"headers": "xcb/xfixes.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-xfixes" },
"-lxcb-xfixes"
],
"use": "xcb"
},
"xcb_xinerama": {
"label": "XCB Xinerama",
"headers": "xcb/xinerama.h",
"sources": [
{ "type": "pkgConfig", "args": "xcb-xinerama" },
"-lxcb-xinerama"
],
"use": "xcb"
},
"xcb_xlib": {
"label": "XCB Xlib",
@ -982,6 +1038,29 @@
"type": "qpaDefaultPlatform",
"log": "value"
},
"xcb_syslibs": {
"label": "XCB (extensions)",
"type": "compile",
"test": {
"include": [
"xcb/xcb.h",
"xcb/xcb_image.h",
"xcb/xcb_keysyms.h",
"xcb/randr.h",
"xcb/shape.h",
"xcb/shm.h",
"xcb/sync.h",
"xcb/xfixes.h",
"xcb/xinerama.h",
"xcb/xcb_icccm.h"
],
"main": [
"int primaryScreen = 0;",
"(void) xcb_connect(\"\", &primaryScreen);"
]
},
"use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb"
},
"x11prefix": {
"label": "X11 prefix",
"type": "getPkgConfigVariable",
@ -1420,7 +1499,7 @@
"enable": "input.xcb == 'system'",
"disable": "input.xcb == 'qt'",
"autoDetect": "!config.darwin",
"condition": "features.xcb && libs.xcb_syslibs",
"condition": "features.xcb && tests.xcb_syslibs",
"output": [ "privateFeature" ]
},
"x11-prefix": {

View File

@ -95,12 +95,13 @@ qtConfig(vulkan) {
}
!qtConfig(system-xcb) {
QMAKE_USE += xcb-static xcb
QMAKE_USE += xcb-static
} else {
qtConfig(xcb-render): QMAKE_USE += xcb_render
qtConfig(xcb-xinput): QMAKE_USE += xcb_xinput
QMAKE_USE += xcb_syslibs
QMAKE_USE += xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama
}
QMAKE_USE += xcb
QMAKE_USE += xkbcommon
qtConfig(xkb) {