Pick up QMAKE_MACOSX_DEPLOYMENT_TARGET from mkspec when building qmake

Instead of setting it explicitly to 10.6. Before 736e4258a this was
not a problem, as we were hard-coding the version flags as part of
the C/CXX_FLAGS for each makespec, so getQMakeConf would pick
them up automatically. When 736e4258a introduced sdk.prf as the
place to resolve these flags in a single place, it broke the
qmake build for macx-clang-libc++, as we were then falling
back to the 10.6 target hard-coded in configure.

We fix this by duplicating some of the logic from sdk.prf, by
pulling out the QMAKE_MACOSX_DEPLOYMENT_TARGET variable
and adding to the C/CXX_FLAGS.

Change-Id: I04afc7525031727c2504588c70dd3f7892cc8e42
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tor Arne Vestbø 2013-03-01 12:14:10 +01:00 committed by The Qt Project
parent 93c6284696
commit c4249e1e92

6
configure vendored
View File

@ -3712,12 +3712,12 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXEEXT=
fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
DEPLOYMENT_CFLAGS="-mmacosx-version-min=$(getQMakeConf QMAKE_MACOSX_DEPLOYMENT_TARGET)"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_CFLAGS="$EXTRA_CFLAGS $DEPLOYMENT_CFLAGS \$(CARBON_CFLAGS)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $DEPLOYMENT_CFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="$EXTRA_OBJS \
qsettings_mac.o \
qcore_mac.o"