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 -= precompile_header
CONFIG += link_pkgconfig wayland-scanner CONFIG += link_pkgconfig wayland-scanner
contains(QT_CONFIG, opengl) { qtConfig(opengl) {
DEFINES += QT_WAYLAND_GL_SUPPORT DEFINES += QT_WAYLAND_GL_SUPPORT
} }
config_xkbcommon { qtConfig(xkbcommon-evdev) {
!contains(QT_CONFIG, no-pkg-config) { QMAKE_USE_PRIVATE += xkbcommon_evdev
PKGCONFIG_PRIVATE += xkbcommon
} else {
LIBS_PRIVATE += -lxkbcommon
}
} else { } else {
DEFINES += QT_NO_WAYLAND_XKB DEFINES += QT_NO_WAYLAND_XKB
} }
!contains(QT_CONFIG, no-pkg-config) { QMAKE_USE += wayland-client wayland-cursor
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
}
INCLUDEPATH += $$PWD/../shared 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 SOURCES += main.cpp
contains(QT_CONFIG, no-pkg-config) { QMAKE_USE += wayland-client
LIBS += -lwayland-client
} else {
CONFIG += link_pkgconfig
PKGCONFIG += wayland-client
}
PLUGIN_TYPE = wayland-decoration-client PLUGIN_TYPE = wayland-decoration-client
load(qt_plugin) load(qt_plugin)

View File

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

View File

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