Move qtwayland over to use the new configuration system

Re-use configuration results from qtbase where possible and move
all pkg-config handling over to be done at configuration time.

Since waylandclient and waylandcompositor are two independent libs,
this required some duplication of features and libraries used by
both in the configure.json files.

Change-Id: I1f3ec56c85cb780324cc7634a3ad7951125853a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Lars Knoll 2016-11-03 15:14:47 +01:00 committed by Paul Olav Tvete
parent 999fe98f66
commit 629663aa2e
5 changed files with 149 additions and 39 deletions

View File

@ -15,26 +15,17 @@ use_gold_linker: CONFIG += no_linker_version_script
CONFIG -= precompile_header
CONFIG += link_pkgconfig wayland-scanner
contains(QT_CONFIG, opengl) {
qtConfig(opengl) {
DEFINES += QT_WAYLAND_GL_SUPPORT
}
config_xkbcommon {
!contains(QT_CONFIG, no-pkg-config) {
PKGCONFIG_PRIVATE += xkbcommon
} else {
LIBS_PRIVATE += -lxkbcommon
}
qtConfig(xkbcommon-evdev) {
QMAKE_USE_PRIVATE += xkbcommon_evdev
} else {
DEFINES += QT_NO_WAYLAND_XKB
}
!contains(QT_CONFIG, no-pkg-config) {
PKGCONFIG_PRIVATE += wayland-client wayland-cursor
contains(QT_CONFIG, glib): PKGCONFIG_PRIVATE += glib-2.0
} else {
LIBS_PRIVATE += -lwayland-client -lwayland-cursor $$QT_LIBS_GLIB
}
QMAKE_USE += wayland-client wayland-cursor
INCLUDEPATH += $$PWD/../shared

View File

@ -0,0 +1,134 @@
{
"module": "waylandclient",
"depends": [
"gui-private"
],
"testDir": "../../config.tests",
"libraries": {
"wayland-client": {
"label": "Wayland client library",
"test": "wayland",
"sources": [
{ "type": "pkgConfig", "args": "wayland-client" },
"-lwayland-client"
]
},
"wayland-cursor": {
"label": "Wayland cursor library",
"test": "wayland_cursor",
"use": "wayland-client",
"sources": [
{ "type": "pkgConfig", "args": "wayland-cursor" },
"-lwayland-cursor"
]
},
"wayland-egl": {
"label": "Wayland EGL library",
"test": "wayland_egl",
"sources": [
{ "type": "pkgConfig", "args": "wayland-egl" },
"-lwayland-egl"
]
},
"xcomposite": {
"label": "XComposite",
"test": "xcomposite",
"sources": [
{ "type": "pkgConfig", "args": "xcomposite" },
"-lxcomposite"
]
},
"glx": {
"label": "GLX",
"test": "glx",
"sources": [
{ "type": "pkgConfig", "args": "x11 gl" },
"-lX11 -lGl"
]
}
},
"tests": {
"wayland-scanner": {
"label": "wayland-scanner",
"type": "compile",
"test": "wayland_scanner",
"use": "wayland-client"
},
"drm-egl-server": {
"label": "DRM EGL Server",
"type": "compile",
"test": "drm_egl_server",
"use": "egl"
},
"libhybris-egl-server": {
"label": "libhybris EGL Server",
"type": "compile",
"test": "libhybris_egl_server",
"use": "egl"
}
},
"features": {
"wayland-client": {
"label": "Qt Wayland Client",
"condition": "!config.win32 && libs.wayland-client && libs.wayland-cursor && tests.wayland-scanner",
"output": [ "privateFeature" ]
},
"wayland-egl": {
"label": "EGL",
"condition": "features.wayland-client && features.opengl && features.egl && libs.wayland-egl",
"output": [ "privateFeature" ]
},
"wayland-brcm": {
"label": "Rasberry Pi",
"condition": "features.wayland-client && features.eglfs_brcm",
"output": [ "privateFeature" ]
},
"xcomposite-egl": {
"label": "XComposite EGL",
"condition": "features.wayland-client && features.opengl && features.egl && libs.xcomposite",
"output": [ "privateFeature" ]
},
"xcomposite-glx": {
"label": "XComposite GLX",
"condition": "features.wayland-client && features.opengl && !features.opengles2 && libs.xcomposite && libs.glx",
"output": [ "privateFeature" ]
},
"drm-egl-server": {
"label": "DRM EGL",
"condition": "features.wayland-client && features.opengl && features.egl && tests.drm-egl-server",
"output": [ "privateFeature" ]
},
"libhybris-egl-server": {
"label": "libhybris EGL",
"condition": "features.wayland-client && features.opengl && features.egl && tests.libhybris-egl-server",
"output": [ "privateFeature" ]
}
},
"report": [
{
"type": "note",
"condition": "!libs.wayland-egl",
"message": "No wayland-egl support detected. Cross-toolkit compatibility disabled."
}
],
"summary": [
{
"section": "Qt Wayland Drivers",
"condition": "features.wayland-client",
"entries": [
"wayland-egl",
"wayland-brcm",
"xcomposite-egl",
"xcomposite-glx",
"drm-egl-server",
"libhybris-egl-server"
]
},
"wayland-client"
]
}

View File

@ -5,12 +5,7 @@ OTHER_FILES += \
SOURCES += main.cpp
contains(QT_CONFIG, no-pkg-config) {
LIBS += -lwayland-client
} else {
CONFIG += link_pkgconfig
PKGCONFIG += wayland-client
}
QMAKE_USE += wayland-client
PLUGIN_TYPE = wayland-decoration-client
load(qt_plugin)

View File

@ -1,21 +1,15 @@
TEMPLATE=subdirs
QT_FOR_CONFIG += waylandclient-private
config_wayland_egl: \
qtConfig(wayland-egl): \
SUBDIRS += wayland-egl
config_brcm_egl: \
qtConfig(wayland-brcm): \
SUBDIRS += brcm-egl
config_xcomposite {
contains(QT_CONFIG, egl): \
qtConfig(xcomposite-egl): \
SUBDIRS += xcomposite-egl
!contains(QT_CONFIG, opengles2):config_glx: \
qtConfig(xcomposite-glx): \
SUBDIRS += xcomposite-glx
}
config_drm_egl_server: \
qtConfig(drm-egl-server): \
SUBDIRS += drm-egl-server
config_libhybris_egl_server: \
qtConfig(libhybris-egl-server): \
SUBDIRS += libhybris-egl-server

View File

@ -4,11 +4,7 @@ TARGET = tst_client
QT += testlib
QT += core-private gui-private
!contains(QT_CONFIG, no-pkg-config) {
PKGCONFIG += wayland-client wayland-server
} else {
LIBS += -lwayland-client -lwayland-server
}
QMAKE_USE += wayland-client wayland-server
CONFIG += wayland-scanner
WAYLANDSERVERSOURCES += \