From 52acc24cdf9e217353e2456cbc009e97176cb70b Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Wed, 5 Oct 2011 13:32:01 +1000 Subject: [PATCH] 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 Reviewed-by: Rohan McGovern --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure b/configure index a0ef3f9..2bb15c3 100755 --- a/configure +++ b/configure @@ -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 -- 2.7.4