summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-03-09 17:18:06 +0100
committerAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-03-22 10:00:35 +0000
commit3df4a76c0c3263ba8cd8ee64b9e81b957ca7c63a (patch)
treea7c6e29ec7c7bbd6caac4d6ab5831a900a61da6c /src
parent186a4d160330a34f15cbe7103a2f82a8aa045476 (diff)
Pass minimum OS X SDK version used during Qt compilation, to GYP.
Previously it was hardcoded to 10.7 which caused two issues: 1) It's not the proper version anymore, the minimum required is 10.10.3. 2) In case if there are 2 SDK versions present on the host machine (eg 10.10 and 10.11), if Qt was compiled with 10.11, GYP would still pick up 10.10 as the minimum viable one for compilation. Change-Id: If815a81696d96a7d5f5f20464385235032b664c3 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/config/mac_osx.pri11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index dd2affca9..01c1ca977 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -1,5 +1,13 @@
include(common.pri)
+# Reuse the cached sdk version value from mac/sdk.prf if available
+# otherwise query for it.
+QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion)
+isEmpty(QMAKE_MAC_SDK_VERSION) {
+ QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null")
+ isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
+}
+
QMAKE_CLANG_DIR = "/usr"
QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
!isEmpty(QMAKE_CLANG_PATH) {
@@ -10,10 +18,9 @@ QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++"
message("Using clang++ from $${QMAKE_CLANG_PATH}")
system("$${QMAKE_CLANG_PATH} --version")
-
GYP_CONFIG += \
qt_os=\"mac\" \
- mac_sdk_min=\"10.7\" \
+ mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \
mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \
clang_use_chrome_plugins=0 \