From 3b6b615334713cbfeb43409ff104244b55f4ce1f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 28 Oct 2013 21:59:17 +0100 Subject: export QT_NO_ equivalents to the build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this makes it possible to properly exclude entire subprojects based on the availability of features, rather than stuffing every single source file with #ifdefs. the defines are aggregated from the -qconfig , -no-feature- and some other configure flags. usage: load(qfeatures) !contains(QT_DISABLED_FEATURES, textarea): SUBDIRS += textstuff Task-number: QTBUG-28102 Change-Id: I83400632d64312fa4b907e1318dddfe27c432387 Reviewed-by: Tor Arne Vestbø Reviewed-by: Joerg Bornemann Reviewed-by: Peter Hartmann Reviewed-by: Tasuku Suzuki --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 3a8665d1c2..b5e375baed 100755 --- a/configure +++ b/configure @@ -6682,6 +6682,16 @@ echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp" if [ -n "$CFG_SKIP_MODULES" ]; then echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp" fi +DISABLED_FEATURES= +for cfg in $QCONFIG_FLAGS; do + ncfg=${cfg#QT_NO_} + if [ x$ncfg != x$cfg ]; then + DISABLED_FEATURES="$DISABLED_FEATURES $ncfg" + fi +done +if [ -n "$DISABLED_FEATURES" ]; then + echo "QT_NO_DEFINES = $DISABLED_FEATURES" >> "$QTMODULE.tmp" +fi echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}" >> "$QTMODULE.tmp" cat >>"$QTMODULE.tmp" <