summaryrefslogtreecommitdiffstats
path: root/src/compositor
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/compositor
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/compositor')
-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
4 files changed, 104 insertions, 14 deletions
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
}