A QPA build on Linux requires xcb or wayland

Require the user to pass -no-xcb and -no-wayland in order to produce
a build that has only the minimal plugin available.

This prevents "useless" builds from being accidentally created.

Change-Id: If2f7f516a52b75998f3ae7bf802f89f93f6e8218
Reviewed-on: http://codereview.qt-project.org/6005
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Lincoln Ramsay 2011-10-05 13:32:01 +10:00 committed by Qt by Nokia
parent a67022723b
commit 52acc24cdf

16
configure vendored
View File

@ -6254,6 +6254,10 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
fi
# Save these for a check later
ORIG_CFG_WAYLAND="$CFG_WAYLAND"
ORIG_CFG_XCB="$CFG_XCB"
if [ "$CFG_WAYLAND" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
@ -6341,6 +6345,18 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
QMakeVar add DEFINES QT_NO_CORESERVICES
fi
if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
if [ "$ORIG_CFG_XCB" = "auto" ] && [ "$ORIG_CFG_WAYLAND" = "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 and -no-wayland to configure. Doing this will produce a Qt that"
echo " cannot run GUI applications."
exit 1
fi
fi
fi
fi