summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne VestbΓΈ <tor.arne.vestbo@digia.com>2013-02-15 17:27:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-22 19:23:26 +0100
commit736e4258a10c1df8dd5e4a5170fbc1a7d6e5588f (patch)
tree97078bbb93ba062a770b3a5ad6767a6758b99ea5 /mkspecs
parentcb8bfeafac537fd8b985eded4b4a0b2adba28b7e (diff)
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>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/mac-clang-libc++-minimum-version.conf5
-rw-r--r--mkspecs/common/mac-minimum-version.conf4
-rw-r--r--mkspecs/features/mac/sdk.prf20
-rw-r--r--mkspecs/macx-clang-32/qmake.conf3
-rw-r--r--mkspecs/macx-clang-libc++-32/qmake.conf3
-rw-r--r--mkspecs/macx-clang-libc++/qmake.conf3
-rw-r--r--mkspecs/macx-clang/qmake.conf3
-rw-r--r--mkspecs/macx-g++-32/qmake.conf3
-rw-r--r--mkspecs/macx-g++/qmake.conf3
-rw-r--r--mkspecs/macx-g++40/qmake.conf3
-rw-r--r--mkspecs/macx-g++42/qmake.conf3
-rw-r--r--mkspecs/macx-llvm/qmake.conf3
-rw-r--r--mkspecs/macx-xcode/qmake.conf3
13 files changed, 40 insertions, 19 deletions
diff --git a/mkspecs/common/mac-clang-libc++-minimum-version.conf b/mkspecs/common/mac-clang-libc++-minimum-version.conf
deleted file mode 100644
index 0941970b13..0000000000
--- a/mkspecs/common/mac-clang-libc++-minimum-version.conf
+++ /dev/null
@@ -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
diff --git a/mkspecs/common/mac-minimum-version.conf b/mkspecs/common/mac-minimum-version.conf
deleted file mode 100644
index acb4132cb6..0000000000
--- a/mkspecs/common/mac-minimum-version.conf
+++ /dev/null
@@ -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
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 955baa3ed2..4c3e2d2b5a 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -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
}
diff --git a/mkspecs/macx-clang-32/qmake.conf b/mkspecs/macx-clang-32/qmake.conf
index b6cceaff91..01b4b419c7 100644
--- a/mkspecs/macx-clang-32/qmake.conf
+++ b/mkspecs/macx-clang-32/qmake.conf
@@ -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
diff --git a/mkspecs/macx-clang-libc++-32/qmake.conf b/mkspecs/macx-clang-libc++-32/qmake.conf
index 122205c13d..af8039d7c9 100644
--- a/mkspecs/macx-clang-libc++-32/qmake.conf
+++ b/mkspecs/macx-clang-libc++-32/qmake.conf
@@ -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++
diff --git a/mkspecs/macx-clang-libc++/qmake.conf b/mkspecs/macx-clang-libc++/qmake.conf
index 700959865e..a2d032bf8c 100644
--- a/mkspecs/macx-clang-libc++/qmake.conf
+++ b/mkspecs/macx-clang-libc++/qmake.conf
@@ -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++
diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf
index 64ce81cabe..d56b7e6f5b 100644
--- a/mkspecs/macx-clang/qmake.conf
+++ b/mkspecs/macx-clang/qmake.conf
@@ -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)
diff --git a/mkspecs/macx-g++-32/qmake.conf b/mkspecs/macx-g++-32/qmake.conf
index 845c3874dc..d60c0dc411 100644
--- a/mkspecs/macx-g++-32/qmake.conf
+++ b/mkspecs/macx-g++-32/qmake.conf
@@ -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
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 32da734e87..2797d766b4 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -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)
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
index 7f581ae58d..c2013c7d9c 100644
--- a/mkspecs/macx-g++40/qmake.conf
+++ b/mkspecs/macx-g++40/qmake.conf
@@ -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
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
index d4803da3cc..e37b8e0acc 100644
--- a/mkspecs/macx-g++42/qmake.conf
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -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
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
index d43eefe002..43db8d850c 100644
--- a/mkspecs/macx-llvm/qmake.conf
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -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
diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf
index 8504310c79..819986fd1c 100644
--- a/mkspecs/macx-xcode/qmake.conf
+++ b/mkspecs/macx-xcode/qmake.conf
@@ -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 =