summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/functions.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/functions.prf')
-rw-r--r--mkspecs/features/functions.prf99
1 files changed, 93 insertions, 6 deletions
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
index d3eda85b2..f858243e1 100644
--- a/mkspecs/features/functions.prf
+++ b/mkspecs/features/functions.prf
@@ -96,16 +96,103 @@ defineReplace(gnOS) {
return(unknown)
}
-defineTest(isDeveloperBuild) {
- qtConfig(private_tests): return(true) # enabled for developer-build
- return(false)
-}
-
defineTest(skipBuild) {
- skipBuildReason = "$$skipBuildReason $${EOL}$$1"
+ isEmpty(skipBuildReason): skipBuildReason = $$1
+ else: skipBuildReason = "$$skipBuildReason $${EOL}$$1"
export(skipBuildReason)
}
+defineTest(isWebEngineCoreBuild) {
+ !qtHaveModule(gui) {
+ skipBuild("QtWebEngine requires QtGui.")
+ return(false)
+ }
+
+ !exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium) {
+ skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
+ return(false)
+ }
+
+ WSPC = $$find(OUT_PWD, \\s)
+ !isEmpty(WSPC) {
+ skipBuild("QtWebEngine cannot be built in a path that contains whitespace characters.")
+ return(false)
+ }
+
+ !isPlatformSupported() {
+ # make sure we have skipBuildReason
+ isEmpty(skipBuildReason): skipBuild("Unknow error. Platform unspported")
+ return(false)
+ }
+
+ linux:contains(QT_CONFIG,no-pkg-config) {
+ skipBuild("pkg-config is required")
+ return(false)
+ }
+
+ include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri)
+ QT_FOR_CONFIG += webenginecore-private
+
+ win32:!qtConfig(webengine-win-compiler64) {
+ skipBuild("Required 64-bit cross-building or native toolchain could not be found.")
+ return(false)
+ }
+
+ !qtConfig(webengine-gperf) {
+ skipBuild("Required gperf could not be found.")
+ return(false)
+ }
+ !qtConfig(webengine-bison) {
+ skipBuild("Required bison could not be found.")
+ return(false)
+ }
+ !qtConfig(webengine-flex) {
+ skipBuild("Required flex could not be found.")
+ return(false)
+ }
+ !qtConfig(webengine-python2) {
+ skipBuild("A suitable version of python2 could not be found.")
+ return(false)
+ }
+
+ sanitizer: !qtConfig(webengine-sanitizer) {
+ 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);
+ }
+
+ linux {
+
+ !qtConfig(webengine-host-pkg-config) {
+ skipBuild("Host pkg-config is required")
+ return(false)
+ }
+
+ !qtConfig(webengine-system-glibc) {
+ skipBuild("A suitable version >= 2.27 of libc could not be found.")
+ return(false)
+ }
+
+ QT_FOR_CONFIG += gui-private
+
+ !qtConfig(webengine-system-khr) {
+ skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)")
+ return(false)
+ }
+
+ for(package, $$list("nss dbus fontconfig")) {
+ !qtConfig(webengine-system-$$package) {
+ skipBuild("A suitable version of $$package could not be found.")
+ return(false)
+ }
+ }
+
+ qtConfig(xcb) : !qtConfig(webengine-ozone-x11) {
+ skipBuild("Could not find all necessary libraries for qpa-xcb support")
+ return(false)
+ }
+ }
+}
+
defineReplace(pkgConfigHostExecutable) {
wrapper_name = $$OUT_PWD/pkg-config-host_wrapper.sh
wrapper_cmd = $$QMAKE_PKG_CONFIG_HOST