EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by individual platform plugins and the configure script has been adjusted to reflect this. Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
parent
2003b83f6f
commit
b936b95965
139
configure
vendored
139
configure
vendored
@ -679,8 +679,7 @@ CFG_OPENVG=auto
|
||||
CFG_OPENVG_LC_INCLUDES=no
|
||||
CFG_OPENVG_SHIVA=auto
|
||||
CFG_OPENVG_ON_OPENGL=auto
|
||||
CFG_EGL=no
|
||||
CFG_EGL_GLES_INCLUDES=no
|
||||
CFG_EGL=auto
|
||||
CFG_SSE=auto
|
||||
CFG_FONTCONFIG=auto
|
||||
CFG_LIBFREETYPE=auto
|
||||
@ -708,6 +707,7 @@ CFG_XINPUT=runtime
|
||||
CFG_XKB=auto
|
||||
CFG_XCB=auto
|
||||
CFG_XCB_LIMITED=yes
|
||||
CFG_EGLFS=auto
|
||||
CFG_LIBUDEV=auto
|
||||
CFG_OBSOLETE_WAYLAND=no
|
||||
CFG_EVDEV=auto
|
||||
@ -893,7 +893,7 @@ while [ "$#" -gt 0 ]; do
|
||||
VAL=no
|
||||
;;
|
||||
#Qt style yes options
|
||||
-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
|
||||
-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
|
||||
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
||||
VAL=yes
|
||||
;;
|
||||
@ -1165,9 +1165,6 @@ while [ "$#" -gt 0 ]; do
|
||||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
|
||||
[ "$VAL" = "es2" ]; then
|
||||
CFG_OPENGL="$VAL"
|
||||
if [ "$VAL" = "es2" ]; then
|
||||
CFG_EGL="yes"
|
||||
fi
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
@ -1175,9 +1172,6 @@ while [ "$#" -gt 0 ]; do
|
||||
openvg)
|
||||
if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_OPENVG="$VAL"
|
||||
if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
|
||||
CFG_EGL=auto
|
||||
fi
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
@ -1654,6 +1648,13 @@ while [ "$#" -gt 0 ]; do
|
||||
wayland)
|
||||
CFG_OBSOLETE_WAYLAND=yes
|
||||
;;
|
||||
eglfs)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_EGLFS="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
libudev)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_LIBUDEV="$VAL"
|
||||
@ -2869,6 +2870,14 @@ if [ "$OPT_HELP" = "yes" ]; then
|
||||
XCBN=" "
|
||||
fi
|
||||
|
||||
if [ "$CFG_EGLFS" = "no" ]; then
|
||||
EGLFSY=" "
|
||||
EGLFSN="*"
|
||||
else
|
||||
EGLFSY="*"
|
||||
EGLFSN=" "
|
||||
fi
|
||||
|
||||
if [ "$CFG_XINPUT2" = "no" ]; then
|
||||
X2Y=" "
|
||||
X2N="*"
|
||||
@ -3191,6 +3200,9 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
|
||||
$XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
|
||||
$XCBY -xcb ............... Compile Xcb support.
|
||||
|
||||
$EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
|
||||
$EGLFSY -eglfs ............. Compile EGLFS support.
|
||||
|
||||
EOF
|
||||
|
||||
fi # X11
|
||||
@ -3309,12 +3321,6 @@ Qt/X11 only:
|
||||
-system-nas-sound .. Use NAS libaudio from the operating system.
|
||||
See http://radscan.com/nas.html
|
||||
|
||||
-egl ............... Use EGL instead of GLX to manage contexts.
|
||||
When building for desktop OpenGL, this option will
|
||||
make Qt use EGL to manage contexts rather than the
|
||||
GLX, which is the default. Note: For OpenGL ES, EGL
|
||||
is always used.
|
||||
|
||||
-no-opengl ......... Do not support OpenGL.
|
||||
+ -opengl <api> ...... Enable OpenGL support.
|
||||
With no parameter, this will auto-detect the "best"
|
||||
@ -4103,6 +4109,14 @@ if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
|
||||
CFG_ACCESSIBILITY=yes
|
||||
fi
|
||||
|
||||
if [ "$CFG_EGLFS" = "yes" ]; then
|
||||
if [ "$CFG_EGL" = "no" ]; then
|
||||
echo "The EGLFS plugin requires EGL support and cannot be built"
|
||||
exit 101
|
||||
fi
|
||||
CFG_EGL=yes
|
||||
fi
|
||||
|
||||
# auto-detect SQL-modules support
|
||||
for _SQLDR in $CFG_SQL_AVAILABLE; do
|
||||
case $_SQLDR in
|
||||
@ -4570,9 +4584,6 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
|
||||
CFG_OPENGL=desktop
|
||||
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
CFG_OPENGL=es2
|
||||
if [ "$CFG_EGL" = "no" ]; then
|
||||
CFG_EGL=auto
|
||||
fi
|
||||
else
|
||||
if [ "$CFG_OPENGL" = "yes" ]; then
|
||||
echo "All the OpenGL functionality tests failed!"
|
||||
@ -4914,7 +4925,6 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
|
||||
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
||||
@ -4984,6 +4994,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
|
||||
# Save these for a check later
|
||||
ORIG_CFG_XCB="$CFG_XCB"
|
||||
ORIG_CFG_EGLFS="$CFG_EGLFS"
|
||||
|
||||
if [ "$CFG_LIBUDEV" != "no" ]; then
|
||||
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
|
||||
@ -5101,6 +5112,31 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
|
||||
fi
|
||||
|
||||
# EGL Support
|
||||
if [ "$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`
|
||||
QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
|
||||
QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
|
||||
QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
|
||||
fi # detect EGL support
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
|
||||
CFG_EGL=yes
|
||||
elif [ "$CFG_EGL" = "yes" ]; then
|
||||
echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
|
||||
echo " You might need to modify the include and library search paths by editing"
|
||||
echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
|
||||
exit 1
|
||||
else
|
||||
CFG_EGL=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_EGLFS" != "no" ]; then
|
||||
CFG_EGLFS="$CFG_EGL"
|
||||
fi
|
||||
|
||||
if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
|
||||
QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
|
||||
QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
|
||||
@ -5116,13 +5152,13 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
|
||||
if [ "$CFG_XCB" = "no" ]; then
|
||||
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
|
||||
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
|
||||
( [ "$ORIG_CFG_XCB" = "auto" ] ); then
|
||||
( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
|
||||
echo "No QPA platform plugin enabled!"
|
||||
echo " If you really want to build without a QPA platform plugin you must pass"
|
||||
echo " -no-xcb. Doing this will produce a Qt that"
|
||||
echo " cannot run GUI applications."
|
||||
echo " -no-xcb and -no-eglfs to configure. Doing this will"
|
||||
echo " produce a Qt that cannot run GUI applications."
|
||||
echo " The dependencies needed for xcb to build are listed in"
|
||||
echo " src/plugins/platforms/xcb/README"
|
||||
exit 1
|
||||
@ -5132,35 +5168,6 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
|
||||
fi
|
||||
|
||||
EGL_VARIANT=none
|
||||
# EGL Support
|
||||
if [ "$PLATFORM_X11" = "yes" ]; then
|
||||
if [ "$CFG_EGL" != "no" ]; then
|
||||
# detect EGL support
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
# EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
|
||||
EGL_VARIANT=regular
|
||||
CFG_EGL=yes
|
||||
fi
|
||||
|
||||
if [ "$EGL_VARIANT" = "none" ]; then
|
||||
if [ "$CFG_EGL" = "yes" ]; then
|
||||
echo "The EGL functionality test failed!"
|
||||
echo " EGL is required for OpenGL ES to manage contexts & surfaces."
|
||||
echo " You might need to modify the include and library search paths by editing"
|
||||
echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
|
||||
echo " ${XQMAKESPEC}."
|
||||
exit 1
|
||||
fi
|
||||
CFG_EGL=no
|
||||
# If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
|
||||
if [ "$CFG_OPENGL" = "es2" ]; then
|
||||
CFG_OPENGL=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
|
||||
|
||||
# freetype support
|
||||
@ -5448,19 +5455,18 @@ else
|
||||
QT_CONFIG="$QT_CONFIG accessibility"
|
||||
fi
|
||||
|
||||
# egl stuff does not belong in lighthouse, but rather in plugins
|
||||
if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
CFG_EGL="no"
|
||||
# enable egl
|
||||
if [ "$CFG_EGL" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG egl"
|
||||
else
|
||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
|
||||
fi
|
||||
|
||||
# enable egl
|
||||
if [ "$CFG_EGL" = "no" ]; then
|
||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
|
||||
# enable eglfs
|
||||
if [ "$CFG_EGLFS" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG eglfs"
|
||||
else
|
||||
QT_CONFIG="$QT_CONFIG egl"
|
||||
if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
|
||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
|
||||
fi
|
||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
|
||||
fi
|
||||
|
||||
# enable openvg
|
||||
@ -6552,13 +6558,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then
|
||||
else
|
||||
echo "OpenGL support ......... no"
|
||||
fi
|
||||
if [ "$CFG_EGL" != "no" ]; then
|
||||
if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
|
||||
echo "EGL support ............ yes <GLES/egl.h>"
|
||||
else
|
||||
echo "EGL support ............ yes <EGL/egl.h>"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_OPENVG" ]; then
|
||||
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
|
||||
echo "OpenVG support ......... ShivaVG"
|
||||
@ -6614,6 +6614,7 @@ echo "Xrender support ........ $CFG_XRENDER"
|
||||
if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
|
||||
echo "XInput2 support ........ $CFG_XINPUT2"
|
||||
fi
|
||||
echo "EGLFS support .......... $CFG_EGLFS"
|
||||
echo
|
||||
|
||||
# complain about not being able to use dynamic plugins if we are using a static build
|
||||
|
@ -512,6 +512,8 @@ static void init_platform(const QString &pluginArgument, const QString &platform
|
||||
const QString defaultPlatform = QLatin1String("xcb");
|
||||
#elif !defined (QT_NO_WAYLAND)
|
||||
const QString defaultPlatform = QLatin1String("wayland");
|
||||
#elif !defined (QT_NO_EGLFS)
|
||||
const QString defaultPlatform = QLatin1String("eglfs");
|
||||
#else
|
||||
const QString defaultPlatform = QLatin1String("minimal");
|
||||
#endif
|
||||
|
@ -72,6 +72,4 @@ SOURCES += qglshaderprogram.cpp \
|
||||
SOURCES += qgl_qpa.cpp \
|
||||
qglpixelbuffer_stub.cpp
|
||||
|
||||
DEFINES += QT_NO_EGL
|
||||
|
||||
INCLUDEPATH += ../3rdparty/harfbuzz/src
|
||||
|
@ -15,3 +15,7 @@ win32: SUBDIRS += windows
|
||||
qnx-*-qcc {
|
||||
SUBDIRS += qnx
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, eglfs) {
|
||||
SUBDIRS += eglfs
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ defines = Q_QDOC \
|
||||
QT_.*_LIB \
|
||||
QT_COMPAT \
|
||||
QT_KEYPAD_NAVIGATION \
|
||||
QT_NO_EGL \
|
||||
QT3_SUPPORT \
|
||||
Q_WS_.* \
|
||||
Q_OS_.* \
|
||||
|
@ -7,9 +7,6 @@ TARGET = tst_qgl
|
||||
requires(contains(QT_CONFIG,opengl))
|
||||
QT += widgets widgets-private opengl-private gui-private core-private testlib
|
||||
|
||||
contains(QT_CONFIG,egl):DEFINES += QGL_EGL
|
||||
win32:!wince*: DEFINES += QT_NO_EGL
|
||||
|
||||
SOURCES += tst_qgl.cpp
|
||||
RESOURCES = qgl.qrc
|
||||
|
||||
|
@ -1396,10 +1396,6 @@ void tst_QGL::glWidgetRenderPixmap()
|
||||
QImage reference(fb.size(), QImage::Format_RGB32);
|
||||
reference.fill(0xffff0000);
|
||||
|
||||
#if defined(QGL_EGL) && !defined(Q_WS_X11)
|
||||
QSKIP("renderPixmap() not yet supported under EGL on your platform");
|
||||
#endif
|
||||
|
||||
QFUZZY_COMPARE_IMAGES(fb, reference);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,4 @@ TARGET = tst_qglbuffer
|
||||
requires(contains(QT_CONFIG,opengl))
|
||||
QT += opengl widgets testlib
|
||||
|
||||
win32:!wince*: DEFINES += QT_NO_EGL
|
||||
|
||||
SOURCES += tst_qglbuffer.cpp
|
||||
|
@ -3,6 +3,4 @@ TARGET = tst_qglfunctions
|
||||
requires(contains(QT_CONFIG,opengl))
|
||||
QT += opengl widgets testlib
|
||||
|
||||
win32:!wince*: DEFINES += QT_NO_EGL
|
||||
|
||||
SOURCES += tst_qglfunctions.cpp
|
||||
|
@ -3,8 +3,6 @@ TARGET = tst_qglthreads
|
||||
requires(contains(QT_CONFIG,opengl))
|
||||
QT += opengl widgets testlib
|
||||
|
||||
win32:!wince*: DEFINES += QT_NO_EGL
|
||||
|
||||
HEADERS += tst_qglthreads.h
|
||||
SOURCES += tst_qglthreads.cpp
|
||||
|
||||
|
@ -1544,8 +1544,6 @@ bool Configure::displayHelp()
|
||||
|
||||
desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n");
|
||||
desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality");
|
||||
desc( "", "Requires EGL support, typically supplied by an OpenGL", false, ' ');
|
||||
desc( "", "or other graphics implementation\n", false, ' ');
|
||||
desc( "-force-asserts", "Activate asserts in release mode.\n");
|
||||
#endif
|
||||
desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n");
|
||||
@ -2850,10 +2848,6 @@ void Configure::generateConfigfiles()
|
||||
if (dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE";
|
||||
if (dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES";
|
||||
|
||||
if (dictionary["OPENGL_ES_CM"] == "no" &&
|
||||
dictionary["OPENGL_ES_2"] == "no" &&
|
||||
dictionary["OPENVG"] == "no") qconfigList += "QT_NO_EGL";
|
||||
|
||||
if (dictionary["OPENGL_ES_CM"] == "yes" ||
|
||||
dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user