summaryrefslogtreecommitdiffstats
path: root/src/buildtools/config/platform.pri
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtools/config/platform.pri')
-rw-r--r--src/buildtools/config/platform.pri115
1 files changed, 115 insertions, 0 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)
+}