diff options
Diffstat (limited to 'tools/qmake/mkspecs')
-rw-r--r-- | tools/qmake/mkspecs/features/configure.prf | 110 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/default_post.prf | 11 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/default_pre.prf | 14 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 50 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/gyp_generator.prf | 2 |
5 files changed, 117 insertions, 70 deletions
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf index 6a67bf097..105e3bc3c 100644 --- a/tools/qmake/mkspecs/features/configure.prf +++ b/tools/qmake/mkspecs/features/configure.prf @@ -21,49 +21,65 @@ defineTest(runConfigure) { } linux { + QT_FOR_CONFIG += gui-private !config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") REQUIRED_PACKAGES = dbus-1 fontconfig - !cross_compile: contains(QT_CONFIG, xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst + !cross_compile: qtConfig(xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse - contains(QT_CONFIG, system-png): REQUIRED_PACKAGES += libpng - contains(QT_CONFIG, system-harfbuzz): REQUIRED_PACKAGES += harfbuzz + qtConfig(system-png): REQUIRED_PACKAGES += libpng + qtConfig(system-harfbuzz): REQUIRED_PACKAGES += harfbuzz !cross_compile: REQUIRED_PACKAGES += libpci for(package, $$list($$REQUIRED_PACKAGES)) { !packagesExist($$package):skipBuild("Unmet dependency: $$package") } - packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip + packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip use_system_zlib else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}") - packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp + packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}") - packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt + packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2 else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}") for(package, $$list("libevent jsoncpp opus protobuf")) { packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package - else: log("System $$package not found. Using Chromium's copy.$${EOL}") + else { + log("System $$package not found. Using Chromium's copy.$${EOL}") + WEBENGINE_CONFIG += use_bundled_$$package + } } use?(system_protobuf) { !system("which protoc > /dev/null") { log("Protobuf compiler not found. Using Chromium's copy of protobuf.$${EOL}") WEBENGINE_CONFIG -= use_system_protobuf + WEBENGINE_CONFIG += use_bundled_protobuf } } config_libvpx: WEBENGINE_CONFIG += use_system_vpx - else: log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}") + else { + log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}") + WEBENGINE_CONFIG += use_bundled_libvpx + } config_srtp: WEBENGINE_CONFIG += use_system_libsrtp - else: log("System libsrtp not found. Using Chromium's copy.$${EOL}") + else { + log("System libsrtp not found. Using Chromium's copy.$${EOL}") + WEBENGINE_CONFIG += use_bundled_srtp + } config_snappy: WEBENGINE_CONFIG += use_system_snappy - else: log("System snappy not found. Using Chromium's copy.$${EOL}") + else { + log("System snappy not found. Using Chromium's copy.$${EOL}") + WEBENGINE_CONFIG += use_bundled_snappy + } !cross_compile { packagesExist(nss): WEBENGINE_CONFIG += use_nss else: log("System NSS not found, BoringSSL will be used.$${EOL}") } } - - # Spellcheck support is moved to dev - WEBENGINE_CONFIG += no_spellcheck + isQtMinimum(5, 8) { + include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) + QT_FOR_CONFIG += webengine-private + qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs + } isEmpty(skipBuildReason): { cache(CONFIG, add, $$list(webengine_successfully_configured)) @@ -73,61 +89,79 @@ defineTest(runConfigure) { } } -} - -# This is called from default_post, at which point we've also parsed -# command line options -defineTest(finalizeConfigure) { - linux { - use?(nss) { - log("Certificate handling.............. Using system NSS$${EOL}") - } else { - log("Certificate handling.............. Using bundled BoringSSL$${EOL}") - } + unix:!darwin { + log("System library dependencies:$${EOL}") use?(system_icu) { packagesExist("icu-uc icu-i18n") { - log("ICU............................... Using system version$${EOL}") + log(" ICU ................................ Using system version$${EOL}") } else { - log("ICU............................... System ICU not found$${EOL}") + log(" ICU ................................ System ICU not found$${EOL}") skipBuild("Unmet dependencies: icu-uc, icu-i18n") } } else { - log("ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}") + log(" ICU ................................ Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}") + WEBENGINE_CONFIG += use_bundled_icu } use?(system_ffmpeg) { packagesExist("libavcodec libavformat libavutil") { packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){ - log("FFMPEG............................ Using system version$${EOL}") + log(" FFMPEG ............................. Using system version$${EOL}") } else { - log("FFMPEG............................ Conflicting FFMPEG dependencies$${EOL}") + log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}") skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux") } } else { - log("FFMPEG............................ System FFMPEG not found$${EOL}") + log(" FFMPEG ............................. System FFMPEG not found$${EOL}") skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil") } } else { - log("FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}") + log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}") + WEBENGINE_CONFIG += use_bundled_ffmpeg } + for(config, WEBENGINE_CONFIG) { + match = $$find(config, "^use_system_") + !isEmpty(match) { + use_system += $$replace(match, ^use_system_,) + } + match = $$find(config, "^use_bundled_") + !isEmpty(match) { + use_bundled += $$replace(match, ^use_bundled_,) + } + } + !isEmpty(use_system): log(" Optional system libraries used ..... $$use_system$${EOL}") + !isEmpty(use_bundled): log(" Optional bundled libraries used .... $$use_bundled$${EOL}") } + log("Configurable features:$${EOL}") use?(proprietary_codecs) { - log("Proprietary codecs (H264, MP3).... Enabled$${EOL}") + log(" Proprietary codecs (H264, MP3) ..... Enabled$${EOL}") } else { - log("Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}") + log(" Proprietary codecs (H264, MP3) ..... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}") } qtHaveModule(positioning): { - log("Geolocation....................... Enabled$${EOL}") + log(" Geolocation ........................ Enabled$${EOL}") } else { - log("Geolocation....................... Not enabled (Requires Qt Positioning module)$${EOL}") + log(" Geolocation ........................ Not enabled (Requires Qt Positioning module)$${EOL}") + } + unix:!darwin { + use?(nss) { + log(" Certificate handling ............... Using system NSS$${EOL}") + } else { + log(" Certificate handling ............... Using bundled BoringSSL$${EOL}") + } } osx { use?(appstore_compliant_code) { - log("AppStore Compliant ............... Enabled$${EOL}") + log(" Mac App Store Compliant ............ Enabled$${EOL}") + } else { + log(" Mac App Store Compliant ............ Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}") + } + use?(native_spellchecker) { + log("Native Spellchecker .............. Enabled$${EOL}") } else { - log("AppStore Compliant ............... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}") + log("Native Spellchecker .............. Not enabled (Default, enable with WEBENGINE_CONFIG+=use_native_spellchecker)$${EOL}") } !isMinOSXSDKVersion(10, 10, 3) { - log("Force Touch API usage ............ Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}") + log(" Force Touch API usage .............. Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}") } } } diff --git a/tools/qmake/mkspecs/features/default_post.prf b/tools/qmake/mkspecs/features/default_post.prf deleted file mode 100644 index 64e8cb1fe..000000000 --- a/tools/qmake/mkspecs/features/default_post.prf +++ /dev/null @@ -1,11 +0,0 @@ -load(default_post) -load(functions) - -root_project_file:isPlatformSupported(): finalizeConfigure() - -!isEmpty(skipBuildReason) { - SUBDIRS = - export(SUBDIRS) - log($${skipBuildReason}$${EOL}) - log(QtWebEngine will not be built.$${EOL}) -} diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf index 27aded013..77e437bc9 100644 --- a/tools/qmake/mkspecs/features/default_pre.prf +++ b/tools/qmake/mkspecs/features/default_pre.prf @@ -1,6 +1,3 @@ -# Resolve root directories for sources -QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,) - # We depend on libc++ to build chromium so our macosx-version-min has to be 10.7 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 @@ -24,14 +21,3 @@ EOL = $$escape_expand(\\n) # Call the original default_pre. load(default_pre) load(functions) - -# Check platform support and run config tests early enough to bail -equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): CONFIG += root_project_file - -root_project_file:isPlatformSupported() { - !exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium) { - error("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.") - } - load(configure) - runConfigure() -} diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 23be1d2fa..95b8c5569 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -1,4 +1,20 @@ +defineTest(isQtMinimum) { + !equals(QT_MAJOR_VERSION, $$1): return(false) + count(ARGS, 1, greaterThan) { + lessThan(QT_MINOR_VERSION, $$2): return(false) + } + return(true) +} + +!isQtMinimum(5, 8) { + defineTest(qtConfig) { + contains(QT_CONFIG, $$1): return(true) + return(false) + } +} + defineTest(isPlatformSupported) { + QT_FOR_CONFIG += gui-private linux { !gcc:!clang { skipBuild("Qt WebEngine on Linux requires clang or GCC.") @@ -11,20 +27,24 @@ defineTest(isPlatformSupported) { return(false) } msvc { - !equals(MSVC_VER, "12.0"):!equals(MSVC_VER, "14.0") { - skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.") + !equals(MSVC_VER, "14.0") { + skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.") return(false) } } else { - skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.") + skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.") return(false) } isBuildingOnWin32() { skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.") } + !isMinWinSDKVersion(10, 10586): { + skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.10586 or newer.") + return(false) + } } else:osx { - lessThan(QMAKE_XCODE_VERSION, 6.1) { - skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 6.1 is required to build Qt WebEngine.") + lessThan(QMAKE_XCODE_VERSION, 5.1) { + skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") return(false) } # We require OS X 10.9 (darwin version 13.0.0) or newer @@ -46,7 +66,7 @@ defineTest(isPlatformSupported) { skipBuild("C++11 support is required in order to build chromium.") return(false) } - contains(QT_CONFIG, mirclient) { + qtConfig(mirclient) { skipBuild("Mir is not yet supported as graphics backend for Qt WebEngine.") return(false) } @@ -96,7 +116,7 @@ defineTest(isGCCVersionSupported) { } defineTest(isQMLTestSupportApiEnabled) { - contains(QT_CONFIG, private_tests): return(true) # enable for developer-build + qtConfig(private_tests): return(true) # enable for developer-build contains(QT_BUILD_PARTS, tests): return(true) contains(WEBENGINE_CONFIG, testsupport): return(true) return(false) @@ -134,6 +154,22 @@ defineTest(isMinOSXSDKVersion) { return(false) } +defineTest(isMinWinSDKVersion) { + requested_major = $$1 + requested_minor = $$2 + WIN_SDK_VERSION = $$(WindowsSDKVersion) + + # 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) +} + # Map to the correct target type for gyp defineReplace(toGypTargetType) { equals(TEMPLATE, "app"):return("executable") diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index 4cf7cd2f4..2fbd74730 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -14,6 +14,8 @@ defineReplace(mocAction) { OUTPUT_NAME = $$mocOutput($$INPUT_FILE) DEFINES_LIST = $$join(DEFINES, " -D", -D) INCPATH = $$join(INCLUDEPATH, " -I", -I) + # we don't generate a moc_predef file yet. + MOC_PREDEF_FILE = MOC_COMMAND = $$clean_path($$mocCmdBase()) MOC_COMMAND = $$replace(MOC_COMMAND, $$re_escape("$(DEFINES)"), $$DEFINES_LIST) MOC_COMMAND = $$replace(MOC_COMMAND, $$re_escape("$(INCPATH)"), $$INCPATH) |