Skip to content

Commit

Permalink
mkspec macx-ios-clang: ensure SDK version is valid
Browse files Browse the repository at this point in the history
Ensure the sdk is of recent enough version since:
1. we build Qt with the latest sdk version, so the app needs
    to do the same to avoid compatibility problems e.g when linking.
2. using a launch screen to support iphone6 depends on sdk 8
3. Apple requires apps that are pushed to appstore to use the
    latest version of the sdk.

Ideally we should store the sdk version used to build Qt, and
require that apps use the same version or newer. But this patch
will do until that is in place.

Change-Id: I18b06d09c1eda15122975b7169ca7a3372df6054
Reviewed-by: Oswald Buddenhagen <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
Richard Moe Gustavsen committed Nov 11, 2014
1 parent 3f7e3b1 commit 459a32e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mkspecs/features/mac/sdk.prf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path) {
QMAKE_MAC_SDK_PATH = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'")
cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path, set stash, QMAKE_MAC_SDK_PATH)
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\'")
cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.version, set stash, QMAKE_MAC_SDK_VERSION)
} else {
QMAKE_MAC_SDK_PATH = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)
QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.version)
}

!equals(MAKEFILE_GENERATOR, XCODE) {
Expand Down
4 changes: 4 additions & 0 deletions mkspecs/macx-ios-clang/features/sdk.prf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
load(sdk)

lessThan(QMAKE_MAC_SDK_VERSION, "8.0"): \
error("Current $$QMAKE_MAC_SDK SDK version ($$QMAKE_MAC_SDK_VERSION) is too old. Please upgrade Xcode.")

0 comments on commit 459a32e

Please sign in to comment.