summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-03 15:14:47 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-23 06:50:34 +0000
commit629663aa2e65d466001b4f887f85def350f46adc (patch)
tree9b05aa37f55e448bbcfe2d9526bfe94ddaa49f0a /src/plugins/platforms
parent999fe98f66ca6e591141859860ff623f81ed8e98 (diff)
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>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/wayland/client.pro17
-rw-r--r--src/plugins/platforms/wayland/configure.json134
-rw-r--r--src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro7
-rw-r--r--src/plugins/platforms/wayland/plugins/hardwareintegration/client.pro24
4 files changed, 148 insertions, 34 deletions
diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro
index 5ae01c04462..749e3b6a366 100644
--- a/src/plugins/platforms/wayland/client.pro
+++ b/src/plugins/platforms/wayland/client.pro
@@ -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
diff --git a/src/plugins/platforms/wayland/configure.json b/src/plugins/platforms/wayland/configure.json
new file mode 100644
index 00000000000..b2a8fbc0b3e
--- /dev/null
+++ b/src/plugins/platforms/wayland/configure.json
@@ -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"
+ ]
+}
diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro b/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro
index 0f62db9cc9d..843149e0836 100644
--- a/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro
+++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro
@@ -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)
diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/client.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/client.pro
index 37a90ab0d44..a5967c710dd 100644
--- a/src/plugins/platforms/wayland/plugins/hardwareintegration/client.pro
+++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/client.pro
@@ -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): \
- SUBDIRS += xcomposite-egl
-
- !contains(QT_CONFIG, opengles2):config_glx: \
- SUBDIRS += xcomposite-glx
-}
-
-config_drm_egl_server: \
+qtConfig(xcomposite-egl): \
+ SUBDIRS += xcomposite-egl
+qtConfig(xcomposite-glx): \
+ SUBDIRS += xcomposite-glx
+qtConfig(drm-egl-server): \
SUBDIRS += drm-egl-server
-
-config_libhybris_egl_server: \
+qtConfig(libhybris-egl-server): \
SUBDIRS += libhybris-egl-server