summaryrefslogtreecommitdiffstats
path: root/tools/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake')
-rw-r--r--tools/qmake/mkspecs/features/configure.prf8
-rw-r--r--tools/qmake/mkspecs/features/functions.prf30
2 files changed, 32 insertions, 6 deletions
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 5674ea3a5..b92c8af61 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -41,10 +41,16 @@ defineTest(runConfigure) {
else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt
else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}")
- for(package, $$list("libevent jsoncpp opus")) {
+ for(package, $$list("libevent jsoncpp opus protobuf")) {
packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package
else: log("System $$package not found. Using Chromium's copy.$${EOL}")
}
+ use?(system_protobuf) {
+ !system("which protoc > /dev/null") {
+ log("Protobuf compiler not found. Using Chromium's copy of protobuf.$${EOL}")
+ WEBENGINE_CONFIG -= use_system_protobuf
+ }
+ }
config_libvpx: WEBENGINE_CONFIG += use_system_vpx
else: log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}")
config_srtp: WEBENGINE_CONFIG += use_system_libsrtp
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")