summaryrefslogtreecommitdiffstats
path: root/src/buildtools
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-05-22 18:17:51 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-06-03 16:57:26 +0200
commit7906b030dc632557f6a2e8cbb471ebf38ef2121c (patch)
treedf5b7bc59ec3e5a6d0e783ce9352508bf5380338 /src/buildtools
parent943d8fea1a5dc5769cd35e18907d970bf9ef30d5 (diff)
Split errorChecks for webengine and pdf
Separate error checks, so qtpdf can have own dependencies. Change-Id: I9e538b875fe67448497f10dcd45c83782d98da2d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/buildtools')
-rw-r--r--src/buildtools/config/support.pri209
-rw-r--r--src/buildtools/configure.json30
2 files changed, 170 insertions, 69 deletions
diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
index 51ed0e42e..6768f0a15 100644
--- a/src/buildtools/config/support.pri
+++ b/src/buildtools/config/support.pri
@@ -1,148 +1,243 @@
defineTest(qtwebengine_skipBuild) {
- isEmpty(skipBuildReason): skipBuildReason = $$1
- else: skipBuildReason = "$$skipBuildReason $${EOL}$$1"
+ skipBuildReason = $$1
export(skipBuildReason)
}
# this should match webengine-core-support
-defineReplace(qtwebengine_checkError) {
+defineReplace(qtwebengine_checkWebEngineCoreError) {
+ !linux:!win32:!macos {
+ qtwebengine_skipBuild("QtWebEngine can be build only on Linux, Windows or macOS.")
+ return(false)
+ }
+ static {
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
+ return(false)
+ }
+ !qtwebengine_checkForGui(QtWebEngine):return(false)
+ !qtwebengine_checkForSubmodule(QtWebEngine):return(false)
+ !qtwebengine_checkForWhiteSpace(QtWebEngine):return(false)
+ !qtwebengine_checkForPlatform(QtWebEngine):return(false)
+ !qtwebengine_checkForArch(QtWebEngine):return(false)
+ !qtwebengine_checkForGperf(QtWebEngine):return(false)
+ !qtwebengine_checkForBison(QtWebEngine):return(false)
+ !qtwebengine_checkForFlex(QtWebEngine):return(false)
+ !qtwebengine_checkForPython2(QtWebengine):return(false)
+ !qtwebengine_checkForSanitizer(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForHostPkgCfg(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForGlibc(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForKhronos(QtWebEngine):return(false)
+ linux:!qtwebengine_checkForPackage(QtWebEngine,nss):return(false)
+ linux:!qtwebengine_checkForPackage(QtWebEngine,dbus):return(false)
+ linux:!qtwebengine_checkForPackage(QtWebEngine,fontconfig):return(false)
+ linux:!qtwebengine_checkForQpaXcb(QtWebEngine):return(false)
+ win32:!qtwebengine_checkForCompiler64(QtWebEngine):return(false)
+ win32:!qtwebengine_checkForWinVersion(QtWebEngine):return(false)
+ return(true)
+}
+
+# this shuold match webengine-qtpdf-support
+defineReplace(qtwebengine_checkPdfError) {
+ !qtwebengine_checkForGui(QtPdf):return(false)
+ !qtwebengine_checkForSubmodule(QtPdf):return(false)
+ !qtwebengine_checkForWhiteSpace(QtPdf):return(false)
+ !qtwebengine_checkForPlatform(QtPdf):return(false)
+ !qtwebengine_checkForArch(QtPdf):return(false)
+ !qtwebengine_checkForGperf(QtPdf):return(false)
+ !qtwebengine_checkForBison(QtPdf):return(false)
+ !qtwebengine_checkForFlex(QtPdf):return(false)
+ !qtwebengine_checkForPython2(QtPdf):return(false)
+ !qtwebengine_checkForSanitizer(QtPdf):return(false)
+ linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
+ linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
+ win32:!qtwebengine_checkForWinVersion(QtPdf):return(false)
+ return(true)
+}
+defineTest(qtwebengine_checkForGui) {
+ module = $$1
!qtHaveModule(gui) {
- qtwebengine_skipBuild("QtWebEngine requires QtGui.")
+ qtwebengine_skipBuild("$${module} requires QtGui.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForSubmodule) {
+ module = $$1
!qtConfig(webengine-submodule) {
- qtwebengine_skipBuild("QtWebEngine required submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
+ qtwebengine_skipBuild("$${module} required submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForWhiteSpace) {
+ module = $$1
!qtConfig(webengine-nowhitespace) {
- qtwebengine_skipBuild("QtWebEngine cannot be built in a path that contains whitespace characters.")
+ qtwebengine_skipBuild("$${module} cannot be built in a path that contains whitespace characters.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForPlatform) {
+ module = $$1
qtConfig(webengine-no-platform-support) {
!isEmpty(platformError) {
- qtwebengine_skipBuild($$platformError)
+ qtwebengine_skipBuild("$${module} $${platformError}")
return(false)
}
!isEmpty(QTWEBENGINE_OUT_ROOT) {
include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
QT_FOR_CONFIG += buildtools-private
- qtwebengine_skipBuild($$PLATFORM_ERROR)
- return(false)
+ !isEmpty(PLATFORM_ERROR) {
+ qtwebengine_skipBuild("$${module} $${PLATFORM_ERROR}")
+ return(false)
+ }
}
- qtwebengine_skipBuild("QtWebEngine will not be built. Platform unsupported.") # re-run of configure when topLevel build
+ qtwebengine_skipBuild("$${module} will not be built. Platform unsupported.")
return(false):
}
+ return(true)
+}
+defineTest(qtwebengine_checkForArch) {
+ module = $$1
!qtConfig(webengine-arch-support) {
- qtwebengine_skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.")
+ qtwebengine_skipBuild("$${module} can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForGperf) {
+ module = $$1
!qtConfig(webengine-gperf) {
- qtwebengine_skipBuild("Tool gperf is required to build QtWebEngine.")
+ qtwebengine_skipBuild("Tool gperf is required to build $${module}.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForBison) {
+ module = $$1
!qtConfig(webengine-bison) {
- qtwebengine_skipBuild("Tool bison is required to build QtWebEngine.")
+ qtwebengine_skipBuild("Tool bison is required to build $${module}.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForFlex) {
+ module = $$1
!qtConfig(webengine-flex) {
- qtwebengine_skipBuild("Tool flex is required to build QtWebEngine.")
+ qtwebengine_skipBuild("Tool flex is required to build $${module}.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForPython2) {
+ module = $$1
!qtConfig(webengine-python2) {
- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build QtWebEngine.")
+ qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.")
return(false)
}
-
- linux:!qtwebengine_checkErrorForLinux():return(false)
- win32:!qtwebengine_checkErrorForWindows():return(false)
- macos:!qtwebengine_checkErrorForMacOS():return(false)
-
- sanitizer: !qtConfig(webengine-sanitizer) {
- qtwebengine_skipBuild("Chosen sanitizer configuration is not supported for QtWebEngine. Check config.log for details or use -feature-webengine-sanitizer to force build with the chosen sanitizer configuration.")
- return(false);
- }
-
return(true)
}
-defineTest(qtwebengine_checkErrorFoMacOS) {
- static {
- qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
- return(false)
+defineTest(qtwebengine_checkForSanitizer) {
+ module = $$1
+ sanitizer:!qtConfig(webengine-sanitizer) {
+ qtwebengine_skipBuild("Chosen sanitizer configuration is not supported for $${module}." \
+ "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) {
-
- static {
- qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
- return(false)
- }
-
+defineTest(qtwebengine_checkForPkgCfg) {
+ module = $$1
!qtConfig(pkg-config) {
- qtwebengine_skipBuild("A pkg-config support is required to build QtWebEngine.")
+ qtwebengine_skipBuild("A pkg-config support is required to build $${module}.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForHostPkgCfg) {
+ module = $$1
!qtConfig(webengine-host-pkg-config) {
- qtwebengine_skipBuild("Host pkg-config is required to build QtWebEngine.")
+ qtwebengine_skipBuild("Host pkg-config is required to build $${module}.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForGlibc) {
+ module = $$1
!qtConfig(webengine-system-glibc) {
- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build QtWebEngine could not be found.")
+ qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build $${module} could not be found.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForKhronos) {
+ module = $$1
!qtConfig(webengine-system-khr) {
- qtwebengine_skipBuild("Khronos development headers required to build QtWebEngine are missing (see mesa/libegl1-mesa-dev)")
+ qtwebengine_skipBuild("Khronos development headers required to build $${module} are missing (see mesa/libegl1-mesa-dev)")
return(false)
}
+ return(true)
+}
- for(package, $$list("nss dbus fontconfig")) {
- !qtConfig(webengine-system-$$package) {
- qtwebengine_skipBuild("A suitable version of $$package required to build QtWebEngine could not be found.")
- return(false)
- }
+defineTest(qtwebengine_checkForPackage) {
+ module = $$1
+ package = $$2
+ !qtConfig(webengine-system-$$package) {
+ qtwebengine_skipBuild("A suitable version of $$package required to build QtWebEngine could not be found.")
+ return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForQpaXcb) {
+ module = $$1
qtConfig(pkg-config):qtConfig(xcb):!qtConfig(webengine-ozone-x11) {
- qtwebengine_skipBuild("Could not find all necessary libraries for qpa-xcb support in QtWebEngine.")
+ qtwebengine_skipBuild("Could not find all necessary libraries for qpa-xcb support in $${module}.")
return(false)
}
return(true)
}
-defineTest(qtwebengine_checkErrorForWindows) {
-
- static {
- qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
- return(false)
- }
-
+defineTest(qtwebengine_checkForCompiler64) {
+ module = $$1
!qtConfig(webengine-win-compiler64) {
- qtwebengine_skipBuild("64-bit cross-building or native toolchain required to build QtWebEngine could not be found.")
+ qtwebengine_skipBuild("64-bit cross-building or native toolchain required to build $${module} could not be found.")
return(false)
}
+ return(true)
+}
+defineTest(qtwebengine_checkForWinVersion) {
+ module = $$1
!qtConfig(webengine-winversion) {
- qtwebengine_skipBuild("QtWebEngine needs Visual Studio 2017 or higher.")
+ qtwebengine_skipBuild("$${module} requires Visual Studio 2017 or higher.")
return(false)
}
return(true)
}
-defineTest(qtwebengine_makeCheckError) {
+defineTest(qtwebengine_makeCheckWebEngineCoreError) {
+ include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
+ QT_FOR_CONFIG += buildtools-private gui-private
+ return($$qtwebengine_checkWebEngineCoreError())
+}
+
+defineTest(qtwebengine_makeCheckPdfError) {
include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
QT_FOR_CONFIG += buildtools-private gui-private
- return($$qtwebengine_checkError())
+ return($$qtwebengine_checkPdfError())
}
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 1511bb059..96727a148 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -357,7 +357,9 @@
"features": {
"webengine-core-support": {
"label": "Support Qt WebEngine Core",
- "condition": "module.gui
+ "condition": "(config.linux || config.win32 || config.macos)
+ && !config.static
+ && module.gui
&& features.webengine-submodule
&& features.webengine-nowhitespace
&& !features.webengine-no-platform-support
@@ -366,8 +368,6 @@
&& features.webengine-bison
&& features.webengine-flex
&& features.webengine-python2
- && !config.static
- && !config.ios
&& (!config.sanitizer || features.webengine-sanitizer)
&& (!config.linux || features.pkg-config)
&& (!config.linux || features.webengine-host-pkg-config)
@@ -384,15 +384,17 @@
"webengine-qtpdf-support": {
"label": "Support Qt Pdf",
"condition": "module.gui
- && features.webengine-python2
- && features.webengine-gperf
- && features.webengine-bison
- && features.webengine-flex
&& features.webengine-submodule
&& features.webengine-nowhitespace
- && features.webengine-arch-support
&& !features.webengine-no-platform-support
+ && features.webengine-arch-support
+ && features.webengine-gperf
+ && features.webengine-bison
+ && features.webengine-flex
+ && features.webengine-python2
+ && (!config.sanitizer || features.webengine-sanitizer)
&& (!config.linux || features.pkg-config)
+ && (!config.linux || features.webengine-host-pkg-config)
&& (!config.win32 || features.webengine-winversion)",
"output": [ "privateFeature" ]
},
@@ -673,9 +675,13 @@
"report": [
{
"type": "skipBuildWarning",
- "condition": "(!features.webengine-core-support && features.build-qtwebengine-core) ||
- (!features.webengine-qtpdf-support && features.build-qtpdf)",
- "message": "qtwebengine_confCheckError"
+ "condition": "!features.webengine-core-support && features.build-qtwebengine-core",
+ "message": "qtwebengine_confCheckWebEngineCoreError"
+ },
+ {
+ "type": "skipBuildWarning",
+ "condition": "!features.webengine-qtpdf-support && features.build-qtpdf",
+ "message": "qtwebengine_confCheckPdfError"
},
{
"type": "note",
@@ -741,7 +747,7 @@
"webengine-system-xi",
"webengine-system-xtst"
]
- },
+ },
{
"section": "Optional system libraries used",
"condition": "config.unix",