summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-02-04 13:56:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-08 13:34:37 +0100
commit99eecab83d4a4c79979aa0b1fcf1f58c14dcf526 (patch)
tree78923bb290b275edf7e3c73551c1eae9a5f16266 /configure
parent9e6bb601319b48b95516afbf11796f4b78e5e0d9 (diff)
Automatically link printsupport plugins to static applications.
Add the required printsupport plugins to the QTPLUGIN variable as is done for the QPA plugin. [ChangeLog][QtPrintSupport] Made the Qt buildsystem automatically include the necessary plugins so that static applications can print. Task-number: QTBUG-29663 Change-Id: I0e2e3b0f25dd5714bd187711c85893926b0c4e85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure b/configure
index 529471d0c4..fee5885619 100755
--- a/configure
+++ b/configure
@@ -780,6 +780,8 @@ QT_LIBS_GLIB=
# default qpa platform
QT_QPA_DEFAULT_PLATFORM=
+# default print support plugin
+QT_PRINTSUPPORT_DEFAULT_PLUGIN=
# Android vars
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
@@ -5427,6 +5429,15 @@ if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
fi
fi
+# Determine print support plugin belonging to the default QPA platform
+if [ "$QT_QPA_DEFAULT_PLATFORM" = "cocoa" ]; then
+ QT_PRINTSUPPORT_DEFAULT_PLUGIN=cocoaprintersupport
+elif [ "$QT_QPA_DEFAULT_PLATFORM" = "windows" ]; then
+ QT_PRINTSUPPORT_DEFAULT_PLUGIN=windowsprintersupport
+elif [ "$QT_QPA_DEFAULT_PLATFORM" = "xcb" ]; then
+ QT_PRINTSUPPORT_DEFAULT_PLUGIN=cupsprintersupport
+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"
@@ -6412,6 +6423,7 @@ EOF
fi
echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
+echo "#define QT_QPA_DEFAULT_PRINTSUPPORTPLUGIN_NAME \"QT_PRINTSUPPORT_DEFAULT_PLUGIN\"" >>"$outpath/src/corelib/global/qconfig.h.new"
# avoid unecessary rebuilds by copying only if qconfig.h has changed
if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
@@ -6499,6 +6511,7 @@ EOF
if [ "$CFG_SHARED" = "no" ]; then
echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM" >> "$QTCONFIG.tmp"
+ echo "QT_DEFAULT_PRINTSUPPORTPLUGIN = $QT_PRINTSUPPORT_DEFAULT_PLUGIN" >> "$QTCONFIG.tmp"
echo >> "$QTCONFIG.tmp"
fi