Move Xcode version extraction to xcode.conf

Change-Id: I11aaf3191cdda6bb88d3e1ba3aba56310720f0a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2013-03-02 15:35:45 +01:00 committed by The Qt Project
parent 4c1e7305e5
commit 5107cacaee
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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)

View File

@ -15,13 +15,9 @@ include(../../common/xcode.conf)
include(../../common/clang.conf)
include(../../common/clang-mac.conf)
# Extract Xcode version using xcodebuild
version_info = $$system("$${QMAKE_XCODE_DEVELOPER_PATH}/usr/bin/xcodebuild -version")
QMAKE_IOS_XCODE_VERSION = $$member(version_info, 1)
unset(version_info)
# Version check
lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
include(../../common/ios.conf)
include(../../common/ios/clang.conf)