summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-08-09 17:40:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-09-07 07:38:48 +0000
commit047d61f188aae3fe3ebc689900b8a5c9fb6e901d (patch)
tree8c12916d64de5139e09b2d9b83425f9821f1a96c /mkspecs
parent68539693fe022595b2e4fbecd448b2fca5e7d3e5 (diff)
Add webengine-core feature
Create/split main configure for submodules. Now configure system knows when webenginecore module is not going to be built and the user gets the feedback after the configure step with the message: The following modules are not being compiled in this configuration: webenginecore webengine webenginewidgets If a module is not built also features are not populated, therefore some tests have to be moved to main configuration. This improves error reporting and prepares landing for QtPdf modules. Remove configure.prf and fix issues after config split. Add makefile call to report errors. Now calling make also reports issues. Task-number: QTBUG-75840 Task-number: QTBUG-76606 Change-Id: I76944df4c5db6f4954c464e3741a8054cb10b40e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/configure.prf103
-rw-r--r--mkspecs/features/functions.prf99
-rw-r--r--mkspecs/features/platform.prf4
3 files changed, 95 insertions, 111 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
deleted file mode 100644
index cc84182b7..000000000
--- a/mkspecs/features/configure.prf
+++ /dev/null
@@ -1,103 +0,0 @@
-# Load configure.prf from qtbase first
-load(configure)
-load(functions)
-load(platform)
-
-defineTest(runConfigure) {
- !qtHaveModule(gui) {
- skipBuild("QtWebEngine requires QtGui.")
- return(false)
- }
-
- !exists(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
-
- !qtConfig(webengine-v8-snapshot-support):qtConfig(webengine-v8-snapshot) {
- skipBuild("V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work."\
- "Please make sure you have 32-bit devel environment installed, or "\
- "configure webengine with '-no-webengine-v8-snapshot'")
- return(false)
- }
-
- 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(webengine-embedded-build): qtConfig(xcb) : !qtConfig(webengine-ozone-x11) {
- skipBuild("Could not find all necessary libraries for qpa-xcb support")
- return(false)
- }
- }
-}
-
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
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
index ef1c86d39..bdd81d337 100644
--- a/mkspecs/features/platform.prf
+++ b/mkspecs/features/platform.prf
@@ -1,5 +1,4 @@
-include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri)
-QT_FOR_CONFIG += webenginecore-private
+include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri)
defineTest(isQtMinimum) {
!equals(QT_MAJOR_VERSION, $$1): return(false)
@@ -24,6 +23,7 @@ defineTest(isPlatformSupported) {
}
isBuildingOnWin32() {
skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
+ return(false)
}
!msvc|intel_icl {
skipBuild("Qt WebEngine on Windows requires MSVC or Clang (MSVC mode).")