From 7906b030dc632557f6a2e8cbb471ebf38ef2121c Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 22 May 2020 18:17:51 +0200 Subject: Split errorChecks for webengine and pdf Separate error checks, so qtpdf can have own dependencies. Change-Id: I9e538b875fe67448497f10dcd45c83782d98da2d Reviewed-by: Allan Sandfeld Jensen --- configure.pri | 61 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'configure.pri') diff --git a/configure.pri b/configure.pri index 37a855177..9c7687eea 100644 --- a/configure.pri +++ b/configure.pri @@ -114,21 +114,17 @@ defineTest(qtwebengine_platformError) { defineTest(qtConfTest_detectPlatform) { QT_FOR_CONFIG += gui-private - !linux:!win32:!macos:!ios { - qtwebengine_platformError("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.") - } else { - linux:qtwebengine_isLinuxPlatformSupported() { - $${1}.platform = "linux" - } - win32:qtwebengine_isWindowsPlatformSupported() { - $${1}.platform = "windows" - } - macos:qtwebengine_isMacOsPlatformSupported() { - $${1}.platform = "macos" - } - ios:qtwebengine_isMacOsPlatformSupported() { - $${1}.platform = "ios" - } + linux:qtwebengine_isLinuxPlatformSupported() { + $${1}.platform = "linux" + } + win32:qtwebengine_isWindowsPlatformSupported() { + $${1}.platform = "windows" + } + macos:qtwebengine_isMacOsPlatformSupported() { + $${1}.platform = "macos" + } + ios:qtwebengine_isMacOsPlatformSupported() { + $${1}.platform = "ios" } !isEmpty(platformError) { @@ -385,19 +381,24 @@ defineTest(qtConfTest_detectNoWhitespace) { return(true) } -defineTest(qtwebengine_confCheckError) { +defineTest(qtwebengine_confCheckWebEngineCoreError) { + QT_FOR_CONFIG += buildtools-private gui-private + return($$qtwebengine_checkWebEngineCoreError()) +} + +defineTest(qtwebengine_confCheckPdfError) { QT_FOR_CONFIG += buildtools-private gui-private - return($$qtwebengine_checkError()) + return($$qtwebengine_checkPdfError()) } defineTest(qtwebengine_isLinuxPlatformSupported) { !gcc|intel_icc { - qtwebengine_platformError("Qt WebEngine on Linux requires clang or GCC.") + qtwebengine_platformError("requires clang or GCC.") return(false) } gcc:!clang:!qtwebengine_isGCCVersionSupported(): return(false) gcc:!qtConfig(c++14) { - qtwebengine_platformError("C++14 support is required in order to build chromium.") + qtwebengine_platformError("requires c++14 support.") return(false) } return(true) @@ -405,19 +406,19 @@ defineTest(qtwebengine_isLinuxPlatformSupported) { defineTest(qtwebengine_isWindowsPlatformSupported) { winrt { - qtwebengine_platformError("WinRT is not supported.") + qtwebengine_platformError("for WinRT is not supported.") return(false) } qtwebengine_isBuildingOnWin32() { - qtwebengine_platformError("Qt WebEngine on Windows must be built on a 64-bit machine.") + qtwebengine_platformError("must be built on a 64-bit machine.") return(false) } !msvc|intel_icl { - qtwebengine_platformError("Qt WebEngine on Windows requires MSVC or Clang (MSVC mode).") + qtwebengine_platformError("requires MSVC or Clang (MSVC mode).") return(false) } !qtwebengine_isMinWinSDKVersion(10, 18362): { - qtwebengine_platformError("Qt WebEngine on Windows requires a Windows SDK version 10.0.18362 or newer.") + qtwebengine_platformError("requires a Windows SDK version 10.0.18362 or newer.") return(false) } return(true) @@ -425,21 +426,21 @@ defineTest(qtwebengine_isWindowsPlatformSupported) { defineTest(qtwebengine_isMacOsPlatformSupported) { !qtwebengine_isMinXcodeVersion(10, 0, 0) { - qtwebengine_platformError("Using Xcode version $$QMAKE_XCODE_VERSION, but at least version 10.0.0 is required to build Qt WebEngine or Qt Pdf.") + qtwebengine_platformError("requires at least version 10.0.0, but using Xcode version $${QMAKE_XCODE_VERSION}.") return(false) } !clang|intel_icc { - qtwebengine_platformError("Qt WebEngine and Qt Pdf requires Clang.") + qtwebengine_platformError("requires Clang.") return(false) } # We require macOS 10.13 (darwin version 17.0.0) or newer. darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) lessThan(darwin_major_version, 17) { - qtwebengine_platformError("Building Qt WebEngine or Qt Pdf requires macOS version 10.13 or newer.") + qtwebengine_platformError("requires macOS version 10.13 or newer.") return(false) } !qtwebengine_isMinOSXSDKVersion(10, 13): { - qtwebengine_platformError("Building Qt WebEngine or Qt Pdf requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") + qtwebengine_platformError("requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") return(false) } return(true) @@ -449,7 +450,7 @@ defineTest(qtwebengine_isGCCVersionSupported) { # Keep in sync with src/webengine/doc/src/qtwebengine-platform-notes.qdoc greaterThan(QMAKE_GCC_MAJOR_VERSION, 4):return(true) - qtwebengine_platformError("Using gcc version "$$QMAKE_GCC_MAJOR_VERSION"."$$QMAKE_GCC_MINOR_VERSION", but at least gcc version 5 is required to build Qt WebEngine.") + qtwebengine_platformError("requires at least gcc version 5, but using gcc version $${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.") return(false) } @@ -470,7 +471,7 @@ defineTest(qtwebengine_isMinOSXSDKVersion) { 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) { - qtwebengine_platformError("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.") + qtwebengine_platformError("requires SDK product version, but could not resolve it for \'$$QMAKE_MAC_SDK\'.") return(false) } major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0) @@ -511,7 +512,7 @@ defineTest(qtwebengine_isMinWinSDKVersion) { WIN_SDK_VERSION = $$(WindowsSDKVersion) isEmpty(WIN_SDK_VERSION)|equals(WIN_SDK_VERSION, "\\") { - qtwebengine_platformError("Could not detect Windows SDK version (\'WindowsSDKVersion\' environment variable is not set).") + qtwebengine_platformError("requires Windows SDK version, but could not detect it (\'WindowsSDKVersion\' environment variable is not set).") return(false) } -- cgit v1.2.3 From 4ff62aec5727ea8f0ae8e9771dc72d977df98d70 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 22 Jun 2020 11:36:46 +0200 Subject: Detect the presence of host node.js Allows building with or without it. Fixes: QTBUG-83729 Change-Id: I88d784e3230208e1268491c6ae0a4ebf1543aac8 Reviewed-by: Michal Klocek --- configure.pri | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.pri') diff --git a/configure.pri b/configure.pri index 9c7687eea..d3ba9b147 100644 --- a/configure.pri +++ b/configure.pri @@ -191,6 +191,19 @@ defineTest(qtConfTest_detectGn) { return(false) } +defineTest(qtConfTest_detectNodeJS) { + nodejs = $$qtConfFindInPath("nodejs$$EXE_SUFFIX") + isEmpty(nodejs) { + qtLog("'nodejs$$EXE_SUFFIX' not found in PATH. Checking for 'node$$EXE_SUFFIX'.") + nodejs = $$qtConfFindInPath("node$$EXE_SUFFIX") + isEmpty(nodejs) { + qtLog("'node$$EXE_SUFFIX' not found in PATH. Giving up.") + return(false) + } + } + return(true) +} + defineTest(qtConfTest_detectEmbedded) { lessThan(QT_MINOR_VERSION, 9) { cross_compile: return(true) -- cgit v1.2.3