summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-08-22 11:19:50 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-09-17 17:01:42 +0000
commit1de18504fa524a49dffe808164fe8f8187b4ffab (patch)
tree57857e885cc5f168a680ee21a9d014f9178c5500
parentf03cd06d89ceba2b99ffb9c4ca911dc01f0bdb08 (diff)
Add platform and architecture to configure
Make configure system aware of platform and architecture checks. Task-number: QTBUG-75840 Task-number: QTBUG-76606 Change-Id: I8d2c9dd863ee2c4a3015ad8147f43dc788cfd72d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--configure.pri22
-rw-r--r--mkspecs/features/functions.prf9
-rw-r--r--mkspecs/features/platform.prf7
-rw-r--r--src/buildtools/configure.json22
4 files changed, 50 insertions, 10 deletions
diff --git a/configure.pri b/configure.pri
index eff7d8f61..0bf4ca41a 100644
--- a/configure.pri
+++ b/configure.pri
@@ -1,3 +1,5 @@
+load(platform)
+
include(src/buildtools/config/functions.pri)
# this must be done outside any function
@@ -35,6 +37,11 @@ defineTest(qtConfTest_detectJumboBuild) {
return(true)
}
+defineTest(qtConfReport_skipBuildWarning) {
+ $${1}()
+ !isEmpty(skipBuildReason):qtConfAddWarning($${skipBuildReason})
+}
+
defineTest(qtConfReport_jumboBuild) {
mergeLimit = $$eval(config.input.merge_limit)
mergeLimit = $$find(mergeLimit, "\d")
@@ -96,6 +103,21 @@ defineTest(qtConfTest_detectBison) {
return(true)
}
+defineTest(qtConfTest_detectPlatform) {
+ !isPlatformSupported() {
+ qtLog("Platform not supported".)
+ return(false)
+ }
+ return(true)
+}
+
+defineTest(qtConfTest_detectArch) {
+ !isArchSupported() {
+ qtLog("Architecture not supported".)
+ return(false)
+ }
+ return(true)
+}
defineTest(qtConfTest_detectFlex) {
flex = $$qtConfFindGnuTool("flex$$EXE_SUFFIX")
isEmpty(flex) {
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
index ec78a59cb..7617005ea 100644
--- a/mkspecs/features/functions.prf
+++ b/mkspecs/features/functions.prf
@@ -104,8 +104,8 @@ defineTest(skipBuild) {
defineTest(isWebEngineCoreBuild) {
- static{
- skipBuild("Static builds of QtWebEngine aren't supported.")
+ static {
+ skipBuild("Static builds of QtWebEngine are not supported.")
return(false)
}
@@ -149,6 +149,11 @@ defineTest(isWebEngineCoreBuild) {
return(false)
}
+ win32:!qtConfig(webengine-winversion) {
+ skipBuild("Needs Visual Studio 2017 or higher")
+ return(false)
+ }
+
!qtConfig(webengine-gperf) {
skipBuild("Required gperf could not be found.")
return(false)
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
index 23260cc79..05854d90f 100644
--- a/mkspecs/features/platform.prf
+++ b/mkspecs/features/platform.prf
@@ -1,6 +1,3 @@
-include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
-QT_FOR_CONFIG += buildtools-private
-
defineTest(isQtMinimum) {
!equals(QT_MAJOR_VERSION, $$1): return(false)
count(ARGS, 1, greaterThan) {
@@ -39,10 +36,6 @@ defineTest(isWindowsPlatformSupported) {
skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.17763 or newer.")
return(false)
}
- !qtConfig(webengine-winversion) {
- skipBuild("Needs Visual Studio 2017 or higher")
- return(false)
- }
return(true)
}
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 3fc342992..62a9368ee 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -351,6 +351,14 @@
"webengine-win-compiler64": {
"label": "64bit compiler",
"type": "isWindowsHostCompiler64"
+ },
+ "webengine-platform": {
+ "label": "platform supported",
+ "type": "detectPlatform"
+ },
+ "webengine-architecture": {
+ "label": "architecture supported",
+ "type": "detectArch"
}
},
"features": {
@@ -362,7 +370,9 @@
&& features.webengine-gperf
&& features.webengine-bison
&& features.webengine-flex
- && (!features.xcb || features.webengine-ozone-x11)",
+ && (!features.xcb || features.webengine-ozone-x11)
+ && tests.webengine-platform
+ && tests.webengine-architecture",
"output": [ "privateFeature" ]
},
"webengine-python2": {
@@ -650,6 +660,16 @@
"type": "warning",
"condition": "config.win32 && !features.webengine-win-compiler64",
"message": "64-bit cross-building or native toolchain is required to build QtWebEngine."
+ },
+ {
+ "type": "skipBuildWarning",
+ "condition": "tests.webengine-platform",
+ "message": "isPlatformSupported"
+ },
+ {
+ "type": "skipBuildWarning",
+ "condition": "tests.webengine-architecture",
+ "message": "isArchSupported"
}
],
"summary": [