summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-08-23 18:23:00 +0200
committerJörg Bornemann <joerg.bornemann@qt.io>2019-09-19 04:12:20 +0000
commit4d1d6fbea5ba80efde7f62532d7c73532361cea9 (patch)
tree5dc7921ea1924800361972e451d9619bc6d682d6 /mkspecs
parenta7f0c31e65034f997513625e3653c1164bfef5ce (diff)
FIXUP: Fix platforms check for topLevel build
In case of a top level build configure.pri is not able to load platform.prf. Move platform.prf to platfrom.pri and use include instead. Fix not loaded qconfig.pri with gcc versions. Make sure there is no function name collision. Change-Id: I2c9994197dc56371fd7ef215ab350aebb89ff701 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/functions.prf50
-rw-r--r--mkspecs/features/platform.prf166
2 files changed, 23 insertions, 193 deletions
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
index 7617005ea..b512db2f1 100644
--- a/mkspecs/features/functions.prf
+++ b/mkspecs/features/functions.prf
@@ -1,3 +1,5 @@
+include($$QTWEBENGINE_ROOT/src/buildtools/config/platform.pri)
+
defineReplace(getConfigDir) {
CONFIG(release, debug|release):return("release")
return("debug")
@@ -96,48 +98,42 @@ defineReplace(gnOS) {
return(unknown)
}
-defineTest(skipBuild) {
- isEmpty(skipBuildReason): skipBuildReason = $$1
- else: skipBuildReason = "$$skipBuildReason $${EOL}$$1"
- export(skipBuildReason)
-}
-
defineTest(isWebEngineCoreBuild) {
static {
- skipBuild("Static builds of QtWebEngine are not supported.")
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
return(false)
}
!qtHaveModule(gui) {
- skipBuild("QtWebEngine requires QtGui.")
+ qtwebengine_skipBuild("QtWebEngine requires QtGui.")
return(false)
}
!exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium) {
- skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
+ qtwebengine_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.")
+ qtwebengine_skipBuild("QtWebEngine cannot be built in a path that contains whitespace characters.")
return(false)
}
- !isPlatformSupported() {
+ !qtwebengine_isPlatformSupported() {
# make sure we have skipBuildReason
- isEmpty(skipBuildReason): skipBuild("Unknow error. Platform unspported.")
+ isEmpty(skipBuildReason): qtwebengine_skipBuild("Unknow error. Platform unspported.")
return(false)
}
- !isArchSupported() {
- isEmpty(skipBuildReason): skipBuild("Unknown error. Architecture unsupported.")
+ !qtwebengine_isArchSupported() {
+ isEmpty(skipBuildReason): qtwebengine_skipBuild("Unknown error. Architecture unsupported.")
return(false)
}
linux:contains(QT_CONFIG,no-pkg-config) {
- skipBuild("pkg-config is required")
+ qtwebengine_skipBuild("pkg-config is required")
return(false)
}
@@ -145,65 +141,65 @@ defineTest(isWebEngineCoreBuild) {
QT_FOR_CONFIG += buildtools-private
win32:!qtConfig(webengine-win-compiler64) {
- skipBuild("Required 64-bit cross-building or native toolchain could not be found.")
+ qtwebengine_skipBuild("Required 64-bit cross-building or native toolchain could not be found.")
return(false)
}
win32:!qtConfig(webengine-winversion) {
- skipBuild("Needs Visual Studio 2017 or higher")
+ qtwebengine_skipBuild("Needs Visual Studio 2017 or higher")
return(false)
}
!qtConfig(webengine-gperf) {
- skipBuild("Required gperf could not be found.")
+ qtwebengine_skipBuild("Required gperf could not be found.")
return(false)
}
!qtConfig(webengine-bison) {
- skipBuild("Required bison could not be found.")
+ qtwebengine_skipBuild("Required bison could not be found.")
return(false)
}
!qtConfig(webengine-flex) {
- skipBuild("Required flex could not be found.")
+ qtwebengine_skipBuild("Required flex could not be found.")
return(false)
}
!qtConfig(webengine-python2) {
- skipBuild("A suitable version of python2 could not be found.")
+ qtwebengine_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.")
+ 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);
}
linux {
!qtConfig(webengine-host-pkg-config) {
- skipBuild("Host pkg-config is required")
+ qtwebengine_skipBuild("Host pkg-config is required")
return(false)
}
!qtConfig(webengine-system-glibc) {
- skipBuild("A suitable version >= 2.27 of libc could not be found.")
+ qtwebengine_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)")
+ 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) {
- skipBuild("A suitable version of $$package could not be found.")
+ qtwebengine_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")
+ qtwebengine_skipBuild("Could not find all necessary libraries for qpa-xcb support")
return(false)
}
}
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
deleted file mode 100644
index 05854d90f..000000000
--- a/mkspecs/features/platform.prf
+++ /dev/null
@@ -1,166 +0,0 @@
-defineTest(isQtMinimum) {
- !equals(QT_MAJOR_VERSION, $$1): return(false)
- count(ARGS, 1, greaterThan) {
- lessThan(QT_MINOR_VERSION, $$2): return(false)
- }
- return(true)
-}
-
-defineTest(isLinuxPlatformSupported) {
- !gcc|intel_icc {
- skipBuild("Qt WebEngine on Linux requires clang or GCC.")
- return(false)
- }
- gcc:!clang:!isGCCVersionSupported(): return(false)
- gcc:!contains(QT_CONFIG, c++14) {
- skipBuild("C++14 support is required in order to build chromium.")
- return(false)
- }
- return(true)
-}
-
-defineTest(isWindowsPlatformSupported) {
- winrt {
- skipBuild("WinRT is not supported.")
- return(false)
- }
- 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).")
- return(false)
- }
- !isMinWinSDKVersion(10, 17763): {
- skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.17763 or newer.")
- return(false)
- }
- return(true)
-}
-
-defineTest(isMacOsPlatformSupported) {
- # FIXME: Try to get it back down to 8.2 for building on OS X 10.11
- !isMinXcodeVersion(8, 3, 3) {
- skipBuild("Using Xcode version $$QMAKE_XCODE_VERSION, but at least version 8.3.3 is required to build Qt WebEngine.")
- return(false)
- }
- !clang|intel_icc {
- skipBuild("Qt WebEngine on macOS requires Clang.")
- return(false)
- }
- # We require macOS 10.12 (darwin version 16.0.0) or newer.
- darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0)
- lessThan(darwin_major_version, 16) {
- skipBuild("Building Qt WebEngine requires macOS version 10.12 or newer.")
- return(false)
- }
- !isMinOSXSDKVersion(10, 12): {
- skipBuild("Building Qt WebEngine requires a macOS SDK version of 10.12 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
- return(false)
- }
- return(true)
-}
-
-defineTest(isPlatformSupported) {
- QT_FOR_CONFIG += gui-private
- !linux:!win32:!macos {
- skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.")
- return(false)
- }
- linux:isLinuxPlatformSupported(): return(true)
- win32:isWindowsPlatformSupported(): return(true)
- macos:isMacOsPlatformSupported(): return(true)
- return(false)
-}
-
-defineTest(isArchSupported) {
- contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true)
- contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
- contains(QT_ARCH, "mips"): return(true)
-# contains(QT_ARCH, "mips64"): return(true)
-
- skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.")
- return(false)
-}
-
-defineTest(isGCCVersionSupported) {
- # Keep in sync with src/webengine/doc/src/qtwebengine-platform-notes.qdoc
- greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true)
-
- skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 5 is required to build Qt WebEngine.")
- return(false)
-}
-
-defineTest(isBuildingOnWin32) {
- # The check below is ugly, but necessary, as it seems to be the only reliable way to detect if the host
- # architecture is 32 bit. QMAKE_HOST.arch does not work as it returns the architecture that the toolchain
- # is building for, not the system's actual architecture.
- PROGRAM_FILES_X86 = $$(ProgramW6432)
- isEmpty(PROGRAM_FILES_X86): return(true)
- return(false)
-}
-
-defineTest(isMinOSXSDKVersion) {
- requested_major = $$1
- requested_minor = $$2
- requested_patch = $$3
- isEmpty(requested_patch): requested_patch = 0
- WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
- export(WEBENGINE_OSX_SDK_PRODUCT_VERSION)
- isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) {
- skipBuild("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.")
- return(false)
- }
- major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0)
- minor_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 1, 1)
- patch_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 2, 2)
- isEmpty(patch_version): patch_version = 0
-
- greaterThan(major_version, $$requested_major):return(true)
- equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
- equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true)
-
- return(false)
-}
-
-defineTest(isMinXcodeVersion) {
- requested_major = $$1
- requested_minor = $$2
- requested_patch = $$3
- isEmpty(requested_minor): requested_minor = 0
- isEmpty(requested_patch): requested_patch = 0
- target_var = QMAKE_XCODE_VERSION
- major_version = $$section($$target_var, ., 0, 0)
- minor_version = $$section($$target_var, ., 1, 1)
- patch_version = $$section($$target_var, ., 2, 2)
- isEmpty(minor_version): minor_version = 0
- isEmpty(patch_version): patch_version = 0
-
- greaterThan(major_version, $$requested_major):return(true)
- equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
- equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true)
-
- return(false)
-}
-
-defineTest(isMinWinSDKVersion) {
- requested_major = $$1
- requested_minor = $$2
- WIN_SDK_VERSION = $$(WindowsSDKVersion)
-
- isEmpty(WIN_SDK_VERSION)|equals(WIN_SDK_VERSION, "\\") {
- skipBuild("Could not detect Windows SDK version (\'WindowsSDKVersion\' environment variable is not set).")
- return(false)
- }
-
- # major.0.minor
- major_version = $$section(WIN_SDK_VERSION, ., 0, 0)
- minor_version = $$section(WIN_SDK_VERSION, ., 2, 2)
-
- greaterThan(major_version, $$requested_major):return(true)
- equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
- equals(major_version, $$requested_major):equals(minor_version, $$requested_minor)::return(true)
-
- return(false)
-}