summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-09-02 16:08:01 +0200
committerJörg Bornemann <joerg.bornemann@qt.io>2019-09-19 07:52:06 +0000
commit1cb3e7271f0ce29647da5eda1e8ff3e5cf4e7abd (patch)
tree3999d15c36ebc491533d97f2efd48cdc27a168ac /src
parent4d1d6fbea5ba80efde7f62532d7c73532361cea9 (diff)
Unify error reporting for configure
Move last two tests (submodule and nowhitespace) to configure system and unify error reporting. Now all error messages come from one single place qtwebengine_checkErrors(). This function is used by configure system reporting and by make call. Remove duplicated strings. Add extra messages when module is not going to be built. Change-Id: Ib373facd58135325495aad52b6e600ec9a61f31f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/buildtools/config/platform.pri115
-rw-r--r--src/buildtools/configure.json93
-rw-r--r--src/core/configure.json2
-rw-r--r--src/src.pro70
4 files changed, 195 insertions, 85 deletions
diff --git a/src/buildtools/config/platform.pri b/src/buildtools/config/platform.pri
index d75c0be26..c5a8d524f 100644
--- a/src/buildtools/config/platform.pri
+++ b/src/buildtools/config/platform.pri
@@ -162,3 +162,118 @@ defineTest(qtwebengine_skipBuild) {
else: skipBuildReason = "$$skipBuildReason $${EOL}$$1"
export(skipBuildReason)
}
+
+defineTest(qtwebengine_checkError) {
+
+ include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
+ QT_FOR_CONFIG += buildtools-private gui-private
+
+ static {
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
+ return(false)
+ }
+
+ !qtHaveModule(gui) {
+ qtwebengine_skipBuild("QtWebEngine requires QtGui.")
+ return(false)
+ }
+
+ !qtConfig(webengine-submodule) {
+ qtwebengine_skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
+ return(false)
+ }
+
+ !qtConfig(webengine-nowhitespace) {
+ qtwebengine_skipBuild("QtWebEngine cannot be built in a path that contains whitespace characters.")
+ return(false)
+ }
+
+ !qtwebengine_isPlatformSupported() {
+ isEmpty(skipBuildReason): qtwebengine_skipBuild("Unknow error. Platform unsupported.")
+ return(false)
+ }
+
+ !qtwebengine_isArchSupported() {
+ isEmpty(skipBuildReason): qtwebengine_skipBuild("Unknown error. Architecture unsupported.")
+ return(false)
+ }
+
+ !qtConfig(webengine-gperf) {
+ qtwebengine_skipBuild("Tool gperf is required to build QtWebEngine.")
+ return(false)
+ }
+
+ !qtConfig(webengine-bison) {
+ qtwebengine_skipBuild("Tool bison is required to build QtWebEngine.")
+ return(false)
+ }
+
+ !qtConfig(webengine-flex) {
+ qtwebengine_skipBuild("Tool flex is required to build QtWebEngine.")
+ return(false)
+ }
+
+ !qtConfig(webengine-python2) {
+ qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build QtWebEngine.")
+ return(false)
+ }
+
+ linux:!qtwebengine_checkErrorForLinux():return(false)
+ win:!qtwebengine_checkErrorForWindows():return(false)
+
+ sanitizer: !qtConfig(webengine-sanitizer) {
+ qtwebengine_skipBuild("Chosen sanitizer configuration is not supported. Check config.log for details or use -feature-webengine-sanitizer to force build with the chosen sanitizer configuration.")
+ return(false);
+ }
+
+ return(true)
+}
+
+defineTest(qtwebengine_checkErrorForLinux) {
+
+ !qtConfig(pkg-config) {
+ qtwebengine_skipBuild("A pkg-config support is required.")
+ return(false)
+ }
+
+ !qtConfig(webengine-host-pkg-config) {
+ qtwebengine_skipBuild("Host pkg-config is required")
+ return(false)
+ }
+
+ !qtConfig(webengine-system-glibc) {
+ qtwebengine_skipBuild("A suitable version >= 2.27 of libc could not be found.")
+ return(false)
+ }
+
+ !qtConfig(webengine-system-khr) {
+ qtwebengine_skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)")
+ return(false)
+ }
+
+ for(package, $$list("nss dbus fontconfig")) {
+ !qtConfig(webengine-system-$$package) {
+ qtwebengine_skipBuild("A suitable version of $$package could not be found.")
+ return(false)
+ }
+ }
+
+ qtConfig(pkg-config):qtConfig(xcb):!qtConfig(webengine-ozone-x11) {
+ qtwebengine_skipBuild("Could not find all necessary libraries for qpa-xcb support")
+ return(false)
+ }
+ return(true)
+}
+
+defineTest(qtwebengine_checkErrorForWindows) {
+ !qtConfig(webengine-win-compiler64) {
+ qtwebengine_skipBuild("Required 64-bit cross-building or native toolchain could not be found.")
+ return(false)
+ }
+
+ !qtConfig(webengine-winversion) {
+ qtwebengine_skipBuild("Needs Visual Studio 2017 or higher")
+ return(false)
+ }
+ return(true)
+}
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 05a05bb4a..c051b6413 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -359,12 +359,19 @@
"webengine-architecture": {
"label": "architecture supported",
"type": "detectArch"
+ },
+ "webengine-submodule" : {
+ "label": "submodule initialized",
+ "type": "detectSubmodule"
+ },
+ "webengine-nowhitespace" : {
+ "label": "build path without whitespace",
+ "type": "detectNoWhitespace"
}
},
"features": {
- "build-qtwebengine-core": {
+ "webengine-core-support": {
"label": "Support Qt WebEngine Core",
- "purpose": "Provides WebEngine Core support.",
"condition": "module.gui
&& features.webengine-python2
&& features.webengine-gperf
@@ -372,11 +379,24 @@
&& features.webengine-flex
&& tests.webengine-platform
&& tests.webengine-architecture
+ && tests.webengine-submodule
+ && tests.webengine-nowhitespace
+ && !config.static
&& (!config.linux || features.pkg-config)
&& (!features.xcb || features.webengine-ozone-x11)
&& (!config.win32 || features.webengine-winversion)",
"output": [ "privateFeature" ]
},
+ "build-qtwebengine-core": {
+ "label": "Build Qt WebEngine Core",
+ "purpose": "Provides WebEngine Core support.",
+ "output": [ "privateFeature" ]
+ },
+ "build-qtpdf": {
+ "label": "Support Qt PDF rendering module",
+ "purpose": "Enables building the Qt PDF rendering module.",
+ "output": [ "privateFeature" ]
+ },
"webengine-developer-build": {
"label": "Developer build",
"purpose": "Enables the developer build configuration.",
@@ -631,66 +651,43 @@
"label": "64bit compiler",
"condition": "config.win32 && tests.webengine-win-compiler64",
"output": [ "privateFeature" ]
+ },
+ "webengine-submodule": {
+ "label": "submodule",
+ "condtion": "tests.webengine-submodule",
+ "output": [ "privateFeature" ]
+ },
+ "webengine-nowhitespace": {
+ "label": "nowhitespace",
+ "condition" : "tests.webengine-nowhitespace",
+ "output": [ "privateFeature" ]
}
},
"report": [
{
- "type": "warning",
- "condition": "!module.gui",
- "message": "QtWebEngine requires QtGui."
- },
- {
- "type": "warning",
- "condition": "!features.webengine-python2",
- "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine."
- },
- {
- "type": "warning",
- "condition": "!features.webengine-gperf",
- "message": "gperf is required to build QtWebEngine."
- },
- {
- "type": "warning",
- "condition": "!features.webengine-bison",
- "message": "bison is required to build QtWebEngine."
- },
- {
- "type": "warning",
- "condition": "!features.webengine-flex",
- "message": "flex is required to build QtWebEngine."
+ "type": "skipBuildWarning",
+ "condition": "!features.webengine-core-support && (features.build-qtwebengine-core || features.build-qtpdf)",
+ "message": "qtwebengine_checkError"
},
{
- "type": "warning",
- "condition": "config.linux && !features.pkg-config",
- "message": "Could not find pkg-config."
+ "type": "note",
+ "condition": "features.webengine-core-support && !features.build-qtwebengine-core",
+ "message": "QtWebEngine build is disabled by user."
},
{
- "type": "warning",
- "condition": "config.linux
- && features.pkg-config
- && features.xcb
- && !features.webengine-ozone-x11",
- "message": "Could not find all necessary libraries for qpa-xcb support."
+ "type": "note",
+ "condition": "features.webengine-core-support && !features.build-qtpdf",
+ "message": "QtPdf build is disabled by user."
},
{
"type": "warning",
- "condition": "config.win32 && !features.webengine-winversion",
- "message": "Needs Visual Studio 2017 or higher."
+ "condition": "!features.webengine-core-support && features.build-qtwebengine-core",
+ "message": "QtWebEngine will not be built."
},
{
"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": "qtwebengine_isPlatformSupported"
- },
- {
- "type": "skipBuildWarning",
- "condition": "tests.webengine-architecture",
- "message": "qtwebengine_isArchSupported"
+ "condition": "!features.webengine-core-support && features.build-qtpdf",
+ "message": "QtPdf will not be built."
}
],
"summary": [
diff --git a/src/core/configure.json b/src/core/configure.json
index b65b8e51e..9ee66bf61 100644
--- a/src/core/configure.json
+++ b/src/core/configure.json
@@ -6,7 +6,7 @@
"gui-private",
"printsupport"
],
- "condition": "features.build-qtwebengine-core",
+ "condition": "features.build-qtwebengine-core && features.webengine-core-support",
"testDir": "../../config.tests",
"commandline": {
"options": {
diff --git a/src/src.pro b/src/src.pro
index 31b91ccab..adb26efdc 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -10,42 +10,40 @@ QT_FOR_CONFIG += buildtools-private webenginecore webenginecore-private webengin
TEMPLATE = subdirs
-isWebEngineCoreBuild(){
-
- qtConfig(build-qtwebengine-core) {
-
- core.depends = buildtools
- process.depends = core
- webengine.depends = core
- webenginewidgets.depends = core webengine
- webengine_plugin.subdir = webengine/plugin
- webengine_plugin.target = sub-webengine-plugin
- webengine_plugin.depends = webengine
-
- SUBDIRS += buildtools core process
-
- qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile {
- SUBDIRS += qwebengine_convert_dict
- qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
- qwebengine_convert_dict.depends = core
- }
-
- qtConfig(webengine-qml) {
- SUBDIRS += webengine
- }
-
- qtConfig(webengine-widgets) {
- SUBDIRS += plugins webenginewidgets
- plugins.depends = webenginewidgets
- }
+
+qtConfig(build-qtwebengine-core):qtConfig(webengine-core-support) {
+ core.depends = buildtools
+ process.depends = core
+ webengine.depends = core
+ webenginewidgets.depends = core webengine
+ webengine_plugin.subdir = webengine/plugin
+ webengine_plugin.target = sub-webengine-plugin
+ webengine_plugin.depends = webengine
+
+ SUBDIRS += buildtools core process
+
+ qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile {
+ SUBDIRS += qwebengine_convert_dict
+ qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
+ qwebengine_convert_dict.depends = core
+ }
+
+ qtConfig(webengine-qml) {
+ SUBDIRS += webengine
}
-} else {
- !isEmpty(skipBuildReason):!build_pass {
- log(QtWebEngine will not be built. $${skipBuildReason} $${EOL})
- errorbuild.commands = @echo QtWebEngine will not be built. $${skipBuildReason}
- errorbuild.CONFIG = phony
- QMAKE_EXTRA_TARGETS += errorbuild
- first.depends += errorbuild
- QMAKE_EXTRA_TARGETS += first
+
+ qtConfig(webengine-widgets) {
+ SUBDIRS += plugins webenginewidgets
+ plugins.depends = webenginewidgets
+ }
+}
+
+!qtConfig(webengine-core-support): qtConfig(build-qtwebengine-core) {
+ !qtwebengine_checkError():!isEmpty(skipBuildReason):!build_pass {
+ errorbuild.commands = @echo Modules will not be built. $${skipBuildReason}
+ errorbuild.CONFIG = phony
+ QMAKE_EXTRA_TARGETS += errorbuild
+ first.depends += errorbuild
+ QMAKE_EXTRA_TARGETS += first
}
}