summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf50
1 files changed, 43 insertions, 7 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 23be1d2fa..95b8c5569 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -1,4 +1,20 @@
+defineTest(isQtMinimum) {
+ !equals(QT_MAJOR_VERSION, $$1): return(false)
+ count(ARGS, 1, greaterThan) {
+ lessThan(QT_MINOR_VERSION, $$2): return(false)
+ }
+ return(true)
+}
+
+!isQtMinimum(5, 8) {
+ defineTest(qtConfig) {
+ contains(QT_CONFIG, $$1): return(true)
+ return(false)
+ }
+}
+
defineTest(isPlatformSupported) {
+ QT_FOR_CONFIG += gui-private
linux {
!gcc:!clang {
skipBuild("Qt WebEngine on Linux requires clang or GCC.")
@@ -11,20 +27,24 @@ defineTest(isPlatformSupported) {
return(false)
}
msvc {
- !equals(MSVC_VER, "12.0"):!equals(MSVC_VER, "14.0") {
- skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.")
+ !equals(MSVC_VER, "14.0") {
+ skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.")
return(false)
}
} else {
- skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.")
+ skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.")
return(false)
}
isBuildingOnWin32() {
skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
}
+ !isMinWinSDKVersion(10, 10586): {
+ skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.10586 or newer.")
+ return(false)
+ }
} else:osx {
- lessThan(QMAKE_XCODE_VERSION, 6.1) {
- skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 6.1 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.9 (darwin version 13.0.0) or newer
@@ -46,7 +66,7 @@ defineTest(isPlatformSupported) {
skipBuild("C++11 support is required in order to build chromium.")
return(false)
}
- contains(QT_CONFIG, mirclient) {
+ qtConfig(mirclient) {
skipBuild("Mir is not yet supported as graphics backend for Qt WebEngine.")
return(false)
}
@@ -96,7 +116,7 @@ defineTest(isGCCVersionSupported) {
}
defineTest(isQMLTestSupportApiEnabled) {
- contains(QT_CONFIG, private_tests): return(true) # enable for developer-build
+ qtConfig(private_tests): return(true) # enable for developer-build
contains(QT_BUILD_PARTS, tests): return(true)
contains(WEBENGINE_CONFIG, testsupport): return(true)
return(false)
@@ -134,6 +154,22 @@ defineTest(isMinOSXSDKVersion) {
return(false)
}
+defineTest(isMinWinSDKVersion) {
+ requested_major = $$1
+ requested_minor = $$2
+ WIN_SDK_VERSION = $$(WindowsSDKVersion)
+
+ # major.0.minor
+ major_version = $$section(WIN_SDK_VERSION, ., 0, 0)
+ minor_version = $$section(WIN_SDK_VERSION, ., 2, 2)
+
+ 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)::return(true)
+
+ return(false)
+}
+
# Map to the correct target type for gyp
defineReplace(toGypTargetType) {
equals(TEMPLATE, "app"):return("executable")