summaryrefslogtreecommitdiffstats
path: root/src
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
commit1d5b44cbb1e834bc8db94d8ec1ac140b8ca9ed37 (patch)
tree12206741f269aef8d45a8f8165919347dd359d0d /src
parentc445cf7d4e517248013e707a5050f9e0408a2746 (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')
-rw-r--r--src/client/client.pro17
-rw-r--r--src/client/configure.json134
-rw-r--r--src/compositor/compositor.pro9
-rw-r--r--src/compositor/compositor_api/compositor_api.pri2
-rw-r--r--src/compositor/configure.json99
-rw-r--r--src/compositor/wayland_wrapper/wayland_wrapper.pri8
-rw-r--r--src/hardwareintegration/client/brcm-egl/brcm-egl.pri9
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri9
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pri7
-rw-r--r--src/hardwareintegration/client/wayland-egl/wayland-egl.pri9
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri8
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri7
-rw-r--r--src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri1
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcm-egl.pri7
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri9
-rw-r--r--src/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri9
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri8
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri9
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri7
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri1
-rw-r--r--src/plugins/decorations/bradient/bradient.pro7
-rw-r--r--src/plugins/hardwareintegration/client/client.pro24
-rw-r--r--src/plugins/hardwareintegration/compositor/compositor.pro23
-rw-r--r--src/plugins/platforms/platforms.pro16
-rw-r--r--src/plugins/shellintegration/ivi-shell/ivi-shell.pro17
-rw-r--r--src/src.pro46
26 files changed, 314 insertions, 188 deletions
diff --git a/src/client/client.pro b/src/client/client.pro
index 5ae01c044..749e3b6a3 100644
--- a/src/client/client.pro
+++ b/src/client/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/client/configure.json b/src/client/configure.json
new file mode 100644
index 000000000..b2a8fbc0b
--- /dev/null
+++ b/src/client/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/compositor/compositor.pro b/src/compositor/compositor.pro
index 251d757e2..935fc2527 100644
--- a/src/compositor/compositor.pro
+++ b/src/compositor/compositor.pro
@@ -5,19 +5,14 @@ QT = core gui-private
qtHaveModule(quick): QT += quick
-contains(QT_CONFIG, opengl):MODULE_DEFINES = QT_WAYLAND_COMPOSITOR_GL
+qtConfig(opengl):MODULE_DEFINES = QT_WAYLAND_COMPOSITOR_GL
CONFIG -= precompile_header
CONFIG += link_pkgconfig
-DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
QMAKE_DOCS = $$PWD/doc/qtwaylandcompositor.qdocconf
-!contains(QT_CONFIG, no-pkg-config) {
- PKGCONFIG_PRIVATE += wayland-server
-} else {
- LIBS += -lwayland-server
-}
+QMAKE_USE += wayland-server
INCLUDEPATH += ../shared
diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri
index 0253cd0ee..1e9284c62 100644
--- a/src/compositor/compositor_api/compositor_api.pri
+++ b/src/compositor/compositor_api/compositor_api.pri
@@ -52,7 +52,7 @@ SOURCES += \
QT += core-private
-qtHaveModule(quick):contains(QT_CONFIG, opengl) {
+qtHaveModule(quick):qtConfig(opengl) {
DEFINES += QT_WAYLAND_COMPOSITOR_QUICK
SOURCES += \
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
new file mode 100644
index 000000000..2ddccd98d
--- /dev/null
+++ b/src/compositor/configure.json
@@ -0,0 +1,99 @@
+{
+ "module": "waylandcompositor",
+ "depends": [
+ "gui-private"
+ ],
+ "testDir": "../../config.tests",
+
+ "libraries": {
+ "wayland-server": {
+ "label": "wayland-server",
+ "test": "wayland",
+ "sources": [
+ { "type": "pkgConfig", "args": "wayland-server" },
+ "-lwayland-server"
+ ]
+ },
+ "wayland-egl": {
+ "test": "wayland_egl",
+ "sources": [
+ { "type": "pkgConfig", "args": "wayland-egl" },
+ "-lwayland-egl"
+ ]
+ },
+ "xcomposite": {
+ "test": "xcomposite",
+ "sources": [
+ { "type": "pkgConfig", "args": "xcomposite" },
+ "-lxcomposite"
+ ]
+ },
+ "glx": {
+ "test": "glx",
+ "sources": [
+ { "type": "pkgConfig", "args": "x11 gl" },
+ "-lX11 -lGl"
+ ]
+ }
+ },
+
+ "tests": {
+ "wayland-scanner": {
+ "type": "compile",
+ "test": "wayland_scanner",
+ "use": "wayland-server"
+ },
+ "drm-egl-server": {
+ "type": "compile",
+ "test": "drm_egl_server",
+ "use": "egl"
+ },
+ "libhybris-egl-server": {
+ "type": "compile",
+ "test": "libhybris_egl_server",
+ "use": "egl"
+ }
+ },
+
+ "features": {
+ "wayland-server": {
+ "label": "Qt Wayland Compositor",
+ "condition": "!config.win32 && libs.wayland-server && tests.wayland-scanner",
+ "output": [ "privateFeature" ]
+ },
+ "wayland-egl": {
+ "label": "EGL",
+ "condition": "features.wayland-server && features.opengl && features.egl && libs.wayland-egl",
+ "output": [ "privateFeature" ]
+ },
+ "wayland-brcm": {
+ "label": "Rasberry Pi",
+ "condition": "features.wayland-server && features.eglfs_brcm",
+ "output": [ "privateFeature" ]
+ },
+ "xcomposite-egl": {
+ "label": "XComposite EGL",
+ "condition": "features.wayland-server && features.egl && features.opengl && libs.xcomposite",
+ "output": [ "privateFeature" ]
+ },
+ "xcomposite-glx": {
+ "label": "XComposite EGL",
+ "condition": "features.wayland-server && features.opengl && !features.opengles2 && libs.xcomposite && libs.glx",
+ "output": [ "privateFeature" ]
+ },
+ "drm-egl-server": {
+ "label": "DRM EGL",
+ "condition": "features.wayland-server && features.opengl && features.egl && tests.drm-egl-server",
+ "output": [ "privateFeature" ]
+ },
+ "libhybris-egl-server": {
+ "label": "libhybris EGL",
+ "condition": "features.wayland-server && features.opengl && features.egl && tests.libhybris-egl-server",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "summary": [
+ "wayland-server"
+ ]
+}
diff --git a/src/compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri
index fa5d76291..388303405 100644
--- a/src/compositor/wayland_wrapper/wayland_wrapper.pri
+++ b/src/compositor/wayland_wrapper/wayland_wrapper.pri
@@ -24,12 +24,8 @@ SOURCES += \
INCLUDEPATH += wayland_wrapper
-config_xkbcommon {
- !contains(QT_CONFIG, no-pkg-config) {
- PKGCONFIG_PRIVATE += xkbcommon
- } else {
- LIBS_PRIVATE += -lxkbcommon
- }
+qtConfig(xkbcommon-evdev) {
+ QMAKE_USE += xkbcommon_evdev
} else {
DEFINES += QT_NO_WAYLAND_XKB
}
diff --git a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri
index e4fd68f3b..64cb44677 100644
--- a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri
+++ b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri
@@ -1,13 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-client
-} else {
- LIBS += -lwayland-client
-}
-
-CONFIG += egl
+QMAKE_USE += egl wayland-client
QT += egl_support-private
SOURCES += $$PWD/qwaylandbrcmeglintegration.cpp \
diff --git a/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri b/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
index c3d592a98..700e95e32 100644
--- a/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
+++ b/src/hardwareintegration/client/drm-egl-server/drm-egl-server.pri
@@ -1,13 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, no-pkg-config) {
- LIBS += -lwayland-client
-} else {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-client
-}
-
-CONFIG += egl
+QMAKE_USE += egl wayland-client
SOURCES += \
$$PWD/drmeglserverbufferintegration.cpp
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pri b/src/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pri
index 55e0ffd2a..bc8215745 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pri
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pri
@@ -1,11 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, no-pkg-config) {
- LIBS += -lEGL -lwayland-client
-} else {
- CONFIG += link_pkgconfig
- PKGCONFIG += egl wayland-client
-}
+QMAKE_USE += egl wayland-client
SOURCES += \
$$PWD/libhybriseglserverbufferintegration.cpp
diff --git a/src/hardwareintegration/client/wayland-egl/wayland-egl.pri b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
index 276b7b54f..f812144a1 100644
--- a/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
+++ b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
@@ -1,13 +1,8 @@
INCLUDEPATH += $$PWD
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-client wayland-egl
-} else {
- LIBS += -lwayland-client -lwayland-egl
-}
+
+QMAKE_USE += egl wayland-client wayland-egl
DEFINES += QT_EGL_WAYLAND
-CONFIG += egl
QT += egl_support-private
SOURCES += $$PWD/qwaylandeglclientbufferintegration.cpp \
diff --git a/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
index 3a5fcb543..f2beb1e03 100644
--- a/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
+++ b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
@@ -1,15 +1,9 @@
INCLUDEPATH += $$PWD
include($$PWD/../xcomposite_share/xcomposite_share.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-client xcomposite x11
-} else {
- LIBS += -lXcomposite -lX11
-}
+QMAKE_USE += egl wayland-client
QT += egl_support-private
-CONFIG += egl
SOURCES += \
$$PWD/qwaylandxcompositeeglcontext.cpp \
diff --git a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri
index bc072bf05..067378af1 100644
--- a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri
+++ b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri
@@ -1,12 +1,7 @@
INCLUDEPATH += $$PWD
include ($$PWD/../xcomposite_share/xcomposite_share.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-client xcomposite gl x11
-} else {
- LIBS += -lXcomposite -lGL -lX11
-}
+QMAKE_USE += wayland-client glx
QT += glx_support-private
diff --git a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
index be3c9fc1b..f255f5c57 100644
--- a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
+++ b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
@@ -1,5 +1,6 @@
INCLUDEPATH += $$PWD
+QMAKE_USE += xcomposite
CONFIG += wayland-scanner
WAYLANDCLIENTSOURCES += $$PWD/../../../extensions/xcomposite.xml
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcm-egl.pri b/src/hardwareintegration/compositor/brcm-egl/brcm-egl.pri
index f4780710a..2658e84b2 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcm-egl.pri
+++ b/src/hardwareintegration/compositor/brcm-egl/brcm-egl.pri
@@ -4,12 +4,7 @@ INCLUDEPATH += $$PWD
DEFINES += QT_NO_OPENGL_ES_3
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-server
-} else {
- LIBS += -lwayland-server
-}
+QMAKE_USE_PRIVATE += wayland-server
for(p, QMAKE_LIBDIR_EGL) {
exists($$p):LIBS += -L$$p
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri b/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
index 2ed5db686..7d6841748 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
+++ b/src/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri
@@ -1,13 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, no-pkg-config) {
- LIBS += -lwayland-server
-} else {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-server
-}
-
-CONFIG += egl
+QMAKE_USE_PRIVATE += egl wayland-server
SOURCES += \
$$PWD/drmeglserverbufferintegration.cpp
diff --git a/src/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri b/src/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri
index 5cbcb6b7c..125be9c54 100644
--- a/src/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri
+++ b/src/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri
@@ -1,13 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, no-pkg-config) {
- LIBS += -lwayland-server
-} else {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-server
-}
-
-CONFIG += egl
+QMAKE_USE_PRIVATE += egl wayland-server
SOURCES += \
$$PWD/libhybriseglserverbufferintegration.cpp
diff --git a/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri b/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
index f36474890..df3aead3e 100644
--- a/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
+++ b/src/hardwareintegration/compositor/wayland-egl/wayland-egl.pri
@@ -1,13 +1,7 @@
INCLUDEPATH += $$PWD
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-server wayland-egl
-} else {
- LIBS += -lwayland-egl -lwayland-server
-}
+QMAKE_USE_PRIVATE += wayland-server wayland-egl
-CONFIG += egl
QT += egl_support-private
SOURCES += \
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri b/src/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri
index d748c2b57..6d0f81659 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri
@@ -1,13 +1,6 @@
include($$PWD/../xcomposite_share/xcomposite_share.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += xcomposite x11 wayland-server
-} else {
- LIBS += -lXcomposite -lX11
-}
-
-CONFIG += egl
+QMAKE_USE_PRIVATE += egl wayland-server x11
INCLUDEPATH += $$PWD
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri b/src/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri
index ccbbe46a6..423ae1815 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri
@@ -1,11 +1,6 @@
include($$PWD/../xcomposite_share/xcomposite_share.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += xcomposite gl x11 wayland-server
-} else {
- LIBS += -lXcomposite -lGL -lX11
-}
+QMAKE_USE_PRIVATE += wayland-server glx
INCLUDEPATH += $$PWD
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri
index 06937c412..69ab6aa10 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri
@@ -1,5 +1,6 @@
INCLUDEPATH += $$PWD
+QMAKE_USE += xcomposite
CONFIG += wayland-scanner
WAYLANDSERVERSOURCES += $$PWD/../../../extensions/xcomposite.xml $$PWD/../../../3rdparty/protocol/wayland.xml
diff --git a/src/plugins/decorations/bradient/bradient.pro b/src/plugins/decorations/bradient/bradient.pro
index 0f62db9cc..843149e08 100644
--- a/src/plugins/decorations/bradient/bradient.pro
+++ b/src/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/hardwareintegration/client/client.pro b/src/plugins/hardwareintegration/client/client.pro
index 37a90ab0d..a5967c710 100644
--- a/src/plugins/hardwareintegration/client/client.pro
+++ b/src/plugins/hardwareintegration/client/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
diff --git a/src/plugins/hardwareintegration/compositor/compositor.pro b/src/plugins/hardwareintegration/compositor/compositor.pro
index 1ecfe37a0..299116257 100644
--- a/src/plugins/hardwareintegration/compositor/compositor.pro
+++ b/src/plugins/hardwareintegration/compositor/compositor.pro
@@ -1,20 +1,15 @@
TEMPLATE = subdirs
+QT_FOR_CONFIG += waylandcompositor-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
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
index 4bee89291..ec589ae83 100644
--- a/src/plugins/platforms/platforms.pro
+++ b/src/plugins/platforms/platforms.pro
@@ -1,19 +1,17 @@
TEMPLATE=subdirs
CONFIG+=ordered
+QT_FOR_CONFIG += waylandclient-private
SUBDIRS += qwayland-generic
-config_wayland_egl {
+qtConfig(wayland-egl): \
SUBDIRS += qwayland-egl
-}
#The following integrations are only useful with QtWaylandCompositor
-config_brcm_egl: \
+qtConfig(wayland-brcm): \
SUBDIRS += qwayland-brcm-egl
-config_xcomposite {
- contains(QT_CONFIG, egl): \
- SUBDIRS += qwayland-xcomposite-egl
- !contains(QT_CONFIG, opengles2):config_glx: \
- SUBDIRS += qwayland-xcomposite-glx
-}
+qtConfig(xcomposite-egl): \
+ SUBDIRS += qwayland-xcomposite-egl
+qtConfig(xcomposite-glx): \
+ SUBDIRS += qwayland-xcomposite-glx
diff --git a/src/plugins/shellintegration/ivi-shell/ivi-shell.pro b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
index 8fd774736..d254b9fc1 100644
--- a/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
+++ b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
@@ -1,22 +1,13 @@
PLUGIN_TYPE = wayland-shell-integration
load(qt_plugin)
-QT += waylandclient-private
+QT += gui-private waylandclient-private
CONFIG += wayland-scanner
-!contains(QT_CONFIG, no-pkg-config) {
- PKGCONFIG += wayland-client wayland-cursor
- CONFIG += link_pkgconfig
-} else {
- LIBS += -lwayland-client -lwayland-cursor
-}
+QMAKE_USE += wayland-client
-config_xkbcommon {
- !contains(QT_CONFIG, no-pkg-config) {
- PKGCONFIG += xkbcommon
- } else {
- LIBS += -lxkbcommon
- }
+qtConfig(xkbcommon-evdev) {
+ QMAKE_USE += xkbcommon_evdev
} else {
DEFINES += QT_NO_WAYLAND_XKB
}
diff --git a/src/src.pro b/src/src.pro
index bf5ffe36a..4ecbc71b9 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,25 +1,33 @@
TEMPLATE=subdirs
+include($$OUT_PWD/client/qtwaylandclient-config.pri)
+include($$OUT_PWD/compositor/qtwaylandcompositor-config.pri)
+QT_FOR_CONFIG += waylandclient-private waylandcompositor-private
-sub_qtwaylandscanner.subdir = qtwaylandscanner
-sub_qtwaylandscanner.target = sub-qtwaylandscanner
-SUBDIRS += sub_qtwaylandscanner
+qtConfig(wayland-client) {
+ sub_qtwaylandscanner.subdir = qtwaylandscanner
+ sub_qtwaylandscanner.target = sub-qtwaylandscanner
+ SUBDIRS += sub_qtwaylandscanner
-sub_compositor.subdir = compositor
-sub_compositor.depends = sub-qtwaylandscanner
-sub_compositor.target = sub-compositor
-SUBDIRS += sub_compositor
+ sub_client.subdir = client
+ sub_client.depends = sub-qtwaylandscanner
+ sub_client.target = sub-client
+ SUBDIRS += sub_client
-sub_imports.subdir = imports
-sub_imports.depends += sub-compositor
-sub_imports.target = sub-imports
-SUBDIRS += sub_imports
+ qtConfig(wayland-server) {
+ sub_compositor.subdir = compositor
+ sub_compositor.depends = sub-qtwaylandscanner
+ sub_compositor.target = sub-compositor
+ SUBDIRS += sub_compositor
-sub_client.subdir = client
-sub_client.depends = sub-qtwaylandscanner
-sub_client.target = sub-client
-SUBDIRS += sub_client
+ sub_imports.subdir = imports
+ sub_imports.depends += sub-compositor
+ sub_imports.target = sub-imports
+ SUBDIRS += sub_imports
+
+ sub_plugins.subdir = plugins
+ sub_plugins.depends = sub-qtwaylandscanner sub-client sub-compositor
+ sub_plugins.target = sub-plugins
+ SUBDIRS += sub_plugins
+ }
+}
-sub_plugins.subdir = plugins
-sub_plugins.depends = sub-qtwaylandscanner sub-client sub-compositor
-sub_plugins.target = sub-plugins
-SUBDIRS += sub_plugins