Cater for upstream changes in eglplatform.h

EGL_NO_X11 has been replaced with USE_X11, thus breaking all existing
code out there, including Qt:
https://github.com/KhronosGroup/EGL-Registry/pull/130

Fix this by defining USE_X11 whenever we do not define EGL_NO_X11.

Fixes: QTBUG-96392
Change-Id: If8b68caa8c9022477d87169ca2e2a0121a9313e0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 4cc5428548cb8ab973e4b0281dd123d59bfaf6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Laszlo Agocs 2021-09-20 11:16:09 +02:00 committed by Qt Cherry-pick Bot
parent 3f0fd35f08
commit 5c7b3db32b
2 changed files with 6 additions and 1 deletions

View File

@ -167,6 +167,7 @@ qt_config_compile_test(egl_x11
// has to be disabled in plugins like xcb in this case since the native display,
// window and pixmap types will be different than what an X-based platform
// plugin would expect.
#define USE_X11
#include <EGL/egl.h>
#include <X11/Xlib.h>

View File

@ -65,7 +65,11 @@
# if !defined(Q_OS_INTEGRITY)
# define WIN_INTERFACE_CUSTOM // NV
# endif // Q_OS_INTEGRITY
#endif // QT_EGL_NO_X11
#else // QT_EGL_NO_X11
// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
// that needs USE_X11 to be defined.
# define USE_X11
#endif
#ifdef QT_EGL_WAYLAND
# define WAYLAND // NV