summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-05-07 17:10:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-26 10:09:58 +0200
commit8ea19caacf281240411541b5af37c2f9a103a7d1 (patch)
tree28d86069b324dd2c558bef89afce3f29a8befee3 /configure
parentc1d5f46d239182763d3b1774b32c94ba25ab2b6a (diff)
add -compile-examples configure option
this overrides the magic that makes examples only install their sources in production builds. packagers may want to force the build of the examples, so they can package them up for demo purposes. this is actually why we formerly had the split between demos and examples ... Task-number: QTBUG-30788 Change-Id: I5633f69404c5aa6846f5496e8f161a273a7a7da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure b/configure
index e633a780bd..d11a50554f 100755
--- a/configure
+++ b/configure
@@ -880,6 +880,7 @@ QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES=""
+CFG_COMPILE_EXAMPLES=auto
CFG_RELEASE_QMAKE=no
CFG_AUDIO_BACKEND=auto
CFG_V8SNAPSHOT=auto
@@ -1404,6 +1405,13 @@ while [ "$#" -gt 0 ]; do
fi
CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
;;
+ compile-examples)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_COMPILE_EXAMPLES="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
@@ -3151,6 +3159,18 @@ else
QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
fi
+# Do not actually build the examples in production builds with -prefix, unless requested
+if [ "$CFG_COMPILE_EXAMPLES" = auto ]; then
+ if [ "$CFG_DEV" = "yes" ] || [ "x$outpath" = "x$QT_INSTALL_PREFIX" ]; then
+ CFG_COMPILE_EXAMPLES=yes
+ else
+ CFG_COMPILE_EXAMPLES=no
+ fi
+fi
+if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
+fi
+
#-------------------------------------------------------------------------------
# help - interactive parts of the script _after_ this section please
#-------------------------------------------------------------------------------
@@ -3452,6 +3472,8 @@ Additional options:
-skip <module> ..... Exclude an entire module from the build.
+ -compile-examples .. Compile examples even in a production build.
+
-no-gui ............ Don't build the Qt GUI module and dependencies.
+ -gui ............... Build the Qt GUI module and dependencies.