summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-03-09 17:59:27 +0100
committerAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-03-22 10:00:32 +0000
commit186a4d160330a34f15cbe7103a2f82a8aa045476 (patch)
treefcbdd4f0099d75c6a972da513cceeabbc3d6ccad /tools/qmake/mkspecs/features/functions.prf
parentd361d1375d066feca0ed3706aaff421b83627372 (diff)
Make isMinOSXSDKVersion() test reusable for different versions.
Change-Id: Ibce28bfce855942b8c5675b6e34c85d837cb6255 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf29
1 files changed, 17 insertions, 12 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index d06b55565..26db26f44 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -33,7 +33,10 @@ defineTest(isPlatformSupported) {
skipBuild("Qt WebEngine requires OS X version 10.9 or newer.")
return(false)
}
- !isOSXSDKVersionSupported(): return(false)
+ !isMinOSXSDKVersion(10, 10, 3): {
+ skipBuild("Qt WebEngine requires an OS X SDK version 10.10.3 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
+ return(false)
+ }
} else {
skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and OS X.")
return(false)
@@ -90,22 +93,24 @@ 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) {
+defineTest(isMinOSXSDKVersion) {
+ requested_major = $$1
+ requested_minor = $$2
+ requested_patch = $$3
+ WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
+ export(WEBENGINE_OSX_SDK_PRODUCT_VERSION)
+ isEmpty(WEBENGINE_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)
+ major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0)
+ minor_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 1, 1)
+ patch_version = $$section(WEBENGINE_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)
+ greaterThan(major_version, $$requested_major):return(true)
+ equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
+ equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):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)
}