Use sdk.prf to set macosx-version-min instead of static conf files

Allows us to dynamically generate the command line option for iOS later,
and allows the user to override QMAKE_MACOSX_DEPLOYMENT_TARGET with the
expected effect on the command line options.

We unset PERL5LIB to ensure we get the system Perl libraries, since the
Mac OS 10.6 CI machine seems to have a broken XML::Parser::Expat from
macports/CPAN.

Change-Id: I04430c7b1daf9452d72f9a04a6b7f8d0d6926884
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2013-02-15 17:27:51 +01:00 committed by The Qt Project
parent cb8bfeafac
commit 736e4258a1
13 changed files with 40 additions and 19 deletions

View File

@ -1,5 +0,0 @@
# clang libc++ requires 10.7
QMAKE_CFLAGS += -mmacosx-version-min=10.7
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.7
QMAKE_LFLAGS += -mmacosx-version-min=10.7

View File

@ -1,4 +0,0 @@
QMAKE_CFLAGS += -mmacosx-version-min=10.6
QMAKE_LFLAGS += -mmacosx-version-min=10.6
QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6

View File

@ -21,4 +21,24 @@
sysrootified =
for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
QMAKE_INCDIR_OPENGL = $$sysrootified
# We use xml as the output format instead of json since plutil on 10.6 does not have that option
QMAKE_MAC_PLATFORM_NAME = $$system("plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - | " \
"PERL5LIB= xpath 'string(//key[.=\"PLATFORM_NAME\"]/following-sibling::*[1])' 2>&1 | " \
"sed 's/.*Value: \\(.*\\)/\\1/'")
isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK '$$QMAKE_MAC_SDK'")
} else {
# Host tools require Mac OS X >= 10.6
QMAKE_MAC_PLATFORM_NAME = macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
}
!equals(MAKEFILE_GENERATOR, XCODE) {
version_min_flag = -m$${QMAKE_MAC_PLATFORM_NAME}-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
QMAKE_CFLAGS += $$version_min_flag
QMAKE_CXXFLAGS += $$version_min_flag
QMAKE_OBJECTIVE_CFLAGS += $$version_min_flag
QMAKE_LFLAGS += $$version_min_flag
}

View File

@ -10,7 +10,8 @@ include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_CFLAGS += -arch i386
QMAKE_OBJECTIVE_CFLAGS += -arch i386

View File

@ -10,7 +10,8 @@ include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
include(../common/mac-clang-libc++-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
QMAKE_CFLAGS += -arch i386
QMAKE_OBJECTIVE_CFLAGS += -arch i386 -stdlib=libc++

View File

@ -10,7 +10,8 @@ include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
include(../common/mac-clang-libc++-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
QMAKE_CXXFLAGS += -stdlib=libc++

View File

@ -10,6 +10,7 @@ include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
load(qt_config)

View File

@ -13,7 +13,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/g++-macx.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_CFLAGS += -arch i386
QMAKE_OBJECTIVE_CFLAGS += -arch i386

View File

@ -13,6 +13,7 @@ QMAKE_INCREMENTAL_STYLE = sublib
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/g++-macx.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
load(qt_config)

View File

@ -13,7 +13,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/g++-macx.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_CC = gcc-4.0
QMAKE_CXX = g++-4.0

View File

@ -13,7 +13,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/g++-macx.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_CC = gcc-4.2
QMAKE_CXX = g++-4.2

View File

@ -13,7 +13,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/llvm.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE

View File

@ -10,7 +10,8 @@ CONFIG += lib_version_first incremental plugin_no_soname app_bundle
include(../common/mac.conf)
include(../common/gcc-base-macx.conf)
include(../common/g++-macx.conf)
include(../common/mac-minimum-version.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_LINK =
QMAKE_LINK_C =