summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake/mkspecs')
-rw-r--r--tools/qmake/mkspecs/features/configure.prf12
-rw-r--r--tools/qmake/mkspecs/features/functions.prf32
2 files changed, 41 insertions, 3 deletions
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 4cb4600b6..b92c8af61 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -41,12 +41,18 @@ 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}")
}
- packagesExist("\'vpx >= 1.4\'"): WEBENGINE_CONFIG += use_system_vpx
- else: log("System vpx >= 1.4 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
else: log("System libsrtp not found. Using Chromium's copy.$${EOL}")
config_snappy: WEBENGINE_CONFIG += use_system_snappy
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 2df689bca..d06b55565 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -19,6 +19,9 @@ defineTest(isPlatformSupported) {
skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.")
return(false)
}
+ isBuildingOnWin32() {
+ skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
+ }
} else:osx {
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.")
@@ -30,6 +33,7 @@ defineTest(isPlatformSupported) {
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)
@@ -77,6 +81,34 @@ defineTest(isQMLTestSupportApiEnabled) {
return(false)
}
+defineTest(isBuildingOnWin32) {
+ # The check below is ugly, but necessary, as it seems to be the only reliable way to detect if the host
+ # architecture is 32 bit. QMAKE_HOST.arch does not work as it returns the architecture that the toolchain
+ # is building for, not the system's actual architecture.
+ PROGRAM_FILES_X86 = $$(ProgramW6432)
+ isEmpty(PROGRAM_FILES_X86): return(true)
+ 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")