diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2012-11-20 15:25:34 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-27 13:07:16 +0100 |
commit | c3278e33534fe937fe367dfbf648282ceba68c7f (patch) | |
tree | 31b266cd37ee052adabc5ee9343636974c912168 /mkspecs/common/ios/versions.conf | |
parent | 67f925701b490e3e9cdbb0dbbfc1a14d1b409bd3 (diff) |
iOS: Replace device and simulator makespecs with single makespec
And use configure's -sdk argument to choose between the iphoneos and the
iphonesimulator SDK. xcodebuild -showsdks can be used to list the
available SDKs. Passing an SDK without a version postfix implies
the latest version of the SDK.
Change-Id: I881df754d522fc91aaa16ba3e39cf0c37a21a1f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'mkspecs/common/ios/versions.conf')
-rw-r--r-- | mkspecs/common/ios/versions.conf | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/mkspecs/common/ios/versions.conf b/mkspecs/common/ios/versions.conf deleted file mode 100644 index 7c2acf9da5..0000000000 --- a/mkspecs/common/ios/versions.conf +++ /dev/null @@ -1,120 +0,0 @@ -# -# Helper to set build tool & SDK versions for iOS configurations -# -# This file sets up the following configuration variables: -# -# QMAKE_IOS_XCODE_VERSION - version number of Xcode being used -# QMAKE_IOS_SDK_VERSION - version number of iOS SDK -# -# Used in: -# -# mkspecs/common/ios/clang.conf -# mkspecs/common/ios/qmake.conf -# mkspecs/unsupported/macx-iosdevice-clang/qmake.conf -# - -# -# IMPORTANT: -# -# Xcode versions >= 4.10 & < 5.0 and versions >= 10.0 are not supported due to -# the way the version checks are done here. As Apple (so far) has not used -# minor version numbers greater than 3 for Xcode, and the Xcode major version -# has only changed three times in the period 2003-2012, this is viewed as an -# acceptable limitation. -# - -# -# Edit values below to match iOS build environment, or leave blank for -# autodetection (slower!) -# - -# Xcode version used -QMAKE_IOS_XCODE_VERSION = - -# iOS SDK version used -QMAKE_IOS_SDK_VERSION = - -# -# Do not edit values below here if using a pre-built SDK -# - -# Minimum iOS version required on deployment target -QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.3 - -########################################################################### - -# Get path of Xcode's Developer directory -QMAKE_XCODE_DEVELOPER_PATH = $$system(xcode-select --print-path) - -# Make sure Xcode path is valid -!exists($$QMAKE_XCODE_DEVELOPER_PATH): \ - error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}! Please use xcode-select to choose Xcode installation path") - -# No Xcode version specified? -isEmpty(QMAKE_IOS_XCODE_VERSION) { - # Get version string from installed Xcode - QMAKE_IOS_XCODE_INFO = $$system($${QMAKE_XCODE_DEVELOPER_PATH}/usr/bin/xcodebuild -version) - - # Extract Xcode version number from output - QMAKE_IOS_XCODE_VERSION = $$member(QMAKE_IOS_XCODE_INFO, 1) - QMAKE_IOS_XCODE_INFO = -} - -# Version check -lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later") - -QMAKE_XCODE_PLATFORM_PATH = $${QMAKE_XCODE_DEVELOPER_PATH}/Platforms - -# iOS 4.3 is the preferred version as it is the earliest version that is armv7/gles2 only -QMAKE_IPHONEOS_PREFERRED_TARGET = 4.3 - -# iOS platform /Developer path -QMAKE_IOS_DEV_PATH = $$QMAKE_XCODE_DEVELOPER_PATH/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer - -# Get lists of installed SDKs from Xcode -QMAKE_XCODE_SDKS = $$system($${QMAKE_XCODE_DEVELOPER_PATH}/usr/bin/xcodebuild -showsdks) - -# No iOS SDK version specified? -isEmpty(QMAKE_IOS_SDK_VERSION) { - # Get names of installed SDKs - sdk_identifier = $$lower($$QMAKE_IOS_DEVICE_TYPE) - sdks = $$find(QMAKE_XCODE_SDKS, ^$$sdk_identifier) - for(v, sdks): { - # Extract SDK version number from output - v = $$replace(v,$$sdk_identifier,) - - # Use latest SDK version - greaterThan(v, $$QMAKE_IOS_SDK_VERSION): QMAKE_IOS_SDK_VERSION = $$v - } - - # We have at least one version of this SDK, so we choose the latest one by - # passing the SDK identifier as QMAKE_MAC_SDK, as reccomended by Apple. - QMAKE_MAC_SDK = $$sdk_identifier -} - -# No deployment target specified? -isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) { - # Use SDK version for iOS versions < preferred - lessThan(QMAKE_IOS_SDK_VERSION, $$QMAKE_IPHONEOS_PREFERRED_TARGET): \ - QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IOS_SDK_VERSION - else: \ - QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IPHONEOS_PREFERRED_TARGET -} - -# Make sure iOS SDK version is >= iOS target version -!lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, $$QMAKE_IOS_SDK_VERSION) { - error("Target iOS version is greater that iOS SDK version $$QMAKE_IOS_SDK_VERSION! Edit mkspecs/common/ios/versions.conf to specify target iOS version.") -} - -unset(QMAKE_IPHONEOS_PREFERRED_TARGET) -unset(QMAKE_XCODE_PLATFORM_PATH) - -# Set deployment target -QMAKE_IOS_VERSION_FLAGS = -miphoneos-version-min=$$QMAKE_IPHONEOS_DEPLOYMENT_TARGET - -# Set build flags -QMAKE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS -QMAKE_CXXFLAGS += $$QMAKE_IOS_VERSION_FLAGS -QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS -QMAKE_LFLAGS += $$QMAKE_IOS_VERSION_FLAGS -QMAKE_IOS_VERSION_FLAGS = |