summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index b6c9b462f2..a356427631 100755
--- a/configure
+++ b/configure
@@ -474,6 +474,10 @@ while [ "$#" -gt 0 ]; do
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
VAL="yes"
;;
+ # Special case for macOS universal builds
+ QMAKE_APPLE_DEVICE_ARCHS=*)
+ QMAKE_APPLE_DEVICE_ARCHS=`echo $1 | sed 's,^QMAKE_APPLE_DEVICE_ARCHS=\(.*\),\1,'`
+ ;;
# most options don't need processing in the configure script, skip them. qmake will do the real validation
*)
shift
@@ -781,6 +785,10 @@ setBootstrapVariable()
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "EXTRA_CXXFLAGS += -MMD" >> "$mkfile"
+ for arch in $QMAKE_APPLE_DEVICE_ARCHS; do
+ echo "EXTRA_CXXFLAGS += -arch $arch" >> "$mkfile"
+ echo "EXTRA_LFLAGS += -arch $arch" >> "$mkfile"
+ done
cat "$in_mkfile" >> "$mkfile"
echo "-include \$(notdir \$(DEPEND_SRC:%.cpp=%.d))" >> "$mkfile"
else