diff options
author | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2016-03-02 15:41:16 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2016-03-08 16:15:47 +0000 |
commit | 0b66f60c4620ca79942a41e52f8c96fa2a00b91c (patch) | |
tree | 1c628b31a0863633ee29bdd608c9bc5aa83ee9a0 /tools/qmake/mkspecs/features/functions.prf | |
parent | 94254206cd89f57b86f8856436287bbcd5702925 (diff) |
Require OSX SDK version of at least 10.10.3.
Chromium 49-based uses new OSX API which was added in SDK 10.10.3. Make
sure not to allow compilation in case the SDK version is lower than
that.
This also reverts commit 70ed3812fbe5eee6f62ddb26251f46061b0d3675
to allow compiling on OSX 10.9, with an appropriate SDK.
Task-number: QTBUG-51350
Change-Id: Ib6dab0a1e16734cda9429363c90d2c8b8838d833
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 2fb96b17d..d06b55565 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -23,16 +23,17 @@ defineTest(isPlatformSupported) { skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.") } } else:osx { - lessThan(QMAKE_XCODE_VERSION, 7.0) { - skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 7.0 is required to build Qt WebEngine.") + lessThan(QMAKE_XCODE_VERSION, 5.1) { + skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") return(false) } - # We require OS X 10.10 (darwin version 14.0.0) or newer + # We require OS X 10.9 (darwin version 13.0.0) or newer darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) - lessThan(darwin_major_version, 14) { - skipBuild("Qt WebEngine requires OS X version 10.10 or newer.") + lessThan(darwin_major_version, 13) { + skipBuild("Qt WebEngine requires OS X version 10.9 or newer.") return(false) } + !isOSXSDKVersionSupported(): return(false) } else { skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and OS X.") return(false) @@ -89,6 +90,25 @@ defineTest(isBuildingOnWin32) { return(false) } +defineTest(isOSXSDKVersionSupported) { + osx_sdk_product_version = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") + isEmpty(osx_sdk_product_version) { + skipBuild("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.") + return(false) + } + major_version = $$section(osx_sdk_product_version, ., 0, 0) + minor_version = $$section(osx_sdk_product_version, ., 1, 1) + patch_version = $$section(osx_sdk_product_version, ., 2, 2) + + # Will work only for SDKs version >= 10.10.3 + greaterThan(major_version, 10):return(true) + equals(major_version, 10):greaterThan(minor_version, 10):return(true) + equals(major_version, 10):equals(minor_version, 10):greaterThan(patch_version, 2):return(true) + + skipBuild("Qt WebEngine requires an OS X SDK version 10.10.3 or newer. Current version is $${osx_sdk_product_version}.") + return(false) +} + # Map to the correct target type for gyp defineReplace(toGypTargetType) { equals(TEMPLATE, "app"):return("executable") |