untangle the egl-x11 relationship in the build system

egl-x11 is used in two places:
- the eglfs-x11 plugin, which has a hard dependency on xcb-xlib
- the xcb-egl plugin, which has a soft dependency on xcb-xlib

that means that the egl-x11 configure test needs to be untangled from
xcb, and that eglfs-x11 should be a separate feature with a proper
dependency declaration.

when the plugins that need egl-x11 are not built, it also makes no sense
to build the respective integration in the egl_support module (even if
it's possible to coax it into building), so adjust things accordingly.

Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
bb10
Oswald Buddenhagen 2017-12-21 20:33:20 +01:00
parent 3ee7aa72b7
commit 501ff0a18c
3 changed files with 13 additions and 8 deletions

View File

@ -715,7 +715,7 @@
"// window and pixmap types will be different than what an X-based platform",
"// plugin would expect."
],
"include": [ "EGL/egl.h", "xcb/xcb.h", "X11/Xlib.h", "X11/Xlib-xcb.h" ],
"include": [ "EGL/egl.h", "X11/Xlib.h" ],
"main": [
"Display *dpy = EGL_DEFAULT_DISPLAY;",
"EGLNativeDisplayType egldpy = XOpenDisplay(\"\");",
@ -725,7 +725,7 @@
"XCloseDisplay(dpy);"
]
},
"use": "egl xcb_xlib"
"use": "egl xlib"
},
"egl-brcm": {
"label": "Broadcom EGL (Raspberry Pi)",
@ -1229,6 +1229,11 @@
"condition": "config.integrity && features.eglfs && tests.egl-openwfd",
"output": [ "privateFeature" ]
},
"eglfs_x11": {
"label": "EGLFS X11",
"condition": "features.eglfs && features.xcb && features.xcb-xlib && features.egl_x11",
"output": [ "privateFeature" ]
},
"gif": {
"label": "GIF",
"condition": "features.imageformatplugin",
@ -1709,7 +1714,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"section": "EGLFS details",
"condition": "features.eglfs",
"entries": [
"eglfs_openwfd", "eglfs_viv", "eglfs_viv_wl", "eglfs_rcar", "eglfs_egldevice", "eglfs_gbm", "eglfs_vsp2", "eglfs_mali", "eglfs_brcm", "egl_x11"
"eglfs_openwfd", "eglfs_viv", "eglfs_viv_wl", "eglfs_rcar", "eglfs_egldevice", "eglfs_gbm", "eglfs_vsp2", "eglfs_mali", "eglfs_brcm", "eglfs_x11"
]
},
"linuxfb", "vnc", "mirclient",

View File

@ -26,15 +26,15 @@ qtConfig(opengl) {
qeglpbuffer.cpp
}
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11
qtConfig(xlib) {
qtConfig(egl_x11) {
HEADERS += \
qxlibeglintegration_p.h
SOURCES += \
qxlibeglintegration.cpp
QMAKE_USE_PRIVATE += xlib
} else {
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11
}
CONFIG += egl

View File

@ -1,7 +1,7 @@
TEMPLATE = subdirs
QT_FOR_CONFIG += gui-private
qtConfig(egl_x11): SUBDIRS += eglfs_x11
qtConfig(eglfs_x11): SUBDIRS += eglfs_x11
qtConfig(eglfs_gbm): SUBDIRS *= eglfs_kms_support eglfs_kms
qtConfig(eglfs_egldevice): SUBDIRS *= eglfs_kms_support eglfs_kms_egldevice
qtConfig(eglfs_vsp2): SUBDIRS += eglfs_kms_vsp2