Don't enable EGL support if OpenGL is disabled.

QtPlatformSupport fails to build if EGL support is enabled but OpenGL
isn't. It tries to compile eglconvenience, but qplatformopenglcontext.h
is empty (#ifndef QT_NO_OPENGL).

It makes no sense to have EGL with no OpenGL ES, so make sure we don't
try it.

The current test to disable EGL if OpenGL desktop is active is upside
down. With -opengl desktop -no-egl, it would complain that EGL support
was requested.

Task-number: QTBUG-28763
Change-Id: I80c780ec78181f3fa85f43e41be21d1217d76610
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
bb10
Thiago Macieira 2013-06-12 15:21:04 -07:00 committed by The Qt Project
parent fc4d45d97d
commit bc7e63e3f9
1 changed files with 12 additions and 8 deletions

20
configure vendored
View File

@ -5381,7 +5381,18 @@ elif [ "$CFG_XKBCOMMON" = "no" ]; then
fi
# EGL Support
if [ "$CFG_EGL" != "no" ]; then
if [ "$CFG_OPENGL" != "es2" ]; then
if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "desktop" ]; then
echo "EGL support was requested but Qt is being configured for desktop OpenGL."
echo "Either disable EGL support or enable OpenGL ES support."
exit 101
elif [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
echo "EGL support was requested but OpenGL ES support is disabled."
echo "Either disable EGL support or enable OpenGL ES support."
exit 101
fi
CFG_EGL=no
elif [ "$CFG_EGL" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
@ -5399,13 +5410,6 @@ if [ "$CFG_EGL" != "no" ]; then
else
CFG_EGL=no
fi
elif [ "$CFG_OPENGL" = "desktop" ]; then
if [ "$CFG_EGL" = "yes" ]; then
echo "EGL support was requested but Qt is being configured for desktop OpenGL."
echo "Either disable EGL support or enable OpenGL ES support."
exit 101
fi
CFG_EGL=no
fi
if [ "$CFG_EGLFS" != "no" ]; then