summaryrefslogtreecommitdiffstats
path: root/mkspecs/common
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-03-02 15:35:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-04 14:54:57 +0100
commit5107cacaeed4b07ca46742206db0f871e284d0ae (patch)
tree89ae2761b219c2943c33dd550a9ddb75de68c54b /mkspecs/common
parent4c1e7305e5a8687bbb029b3e5a3a0ec206909567 (diff)
Move Xcode version extraction to xcode.conf
Change-Id: I11aaf3191cdda6bb88d3e1ba3aba56310720f0a1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/common')
-rw-r--r--mkspecs/common/ios/clang.conf4
-rw-r--r--mkspecs/common/xcode.conf4
2 files changed, 6 insertions, 2 deletions
diff --git a/mkspecs/common/ios/clang.conf b/mkspecs/common/ios/clang.conf
index 7513a0a315..28bf013542 100644
--- a/mkspecs/common/ios/clang.conf
+++ b/mkspecs/common/ios/clang.conf
@@ -3,7 +3,7 @@
#
# Depends on:
#
-# QMAKE_IOS_XCODE_VERSION - set in macx-ios-clang/qmake.conf
+# QMAKE_XCODE_VERSION - set in xcode.conf
#
# iOS build flags
@@ -28,7 +28,7 @@ QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector
QMAKE_IOS_CXXFLAGS += -Wc++11-extensions -Wc++0x-extensions -Wno-c++11-long-long
# Warn about unsupported (later than 4.5) Xcode versions
-!lessThan(QMAKE_IOS_XCODE_VERSION, "4.7"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
+!lessThan(QMAKE_XCODE_VERSION, "4.7"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
diff --git a/mkspecs/common/xcode.conf b/mkspecs/common/xcode.conf
index d38a7bdf6d..4604caf074 100644
--- a/mkspecs/common/xcode.conf
+++ b/mkspecs/common/xcode.conf
@@ -11,3 +11,7 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
!exists($$QMAKE_XCODE_DEVELOPER_PATH): \
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
+# Extract Xcode version using xcodebuild
+xcode_version = $$system("xcodebuild -version")
+QMAKE_XCODE_VERSION = $$first(xcode_version)
+unset(xcode_version)