Commit 1691d229 authored by Michal Klocek's avatar Michal Klocek
Browse files

Remove WEBENGINE_CONFIG from configure


Do not store flags in qmake.cache with WEBENGINE_CONFIG.
Use directly qtConfig values insted. This makes configuration
more consistent, simplifies handling and avoids passing
values from qtConfig to WEBENIGNE_CONFIG, which then
were passed to gn.

[ChangeLog] Removing WEBENGINE_CONFIG from qtwebengine configure

Change-Id: I1a773fb4bff6d67ad75c237d044998051d92ab51
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: default avatarQt CI Bot <qt_ci_bot@qt-project.org>
Showing with 89 additions and 154 deletions
......@@ -11,7 +11,7 @@
"webengine-icu": { "type": "enum", "name": "system-icu", "values": { "system": "yes", "qt": "no" } },
"ffmpeg": { "type": "enum", "name": "system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
"opus": { "type": "enum", "name": "system-opus", "values": { "system": "yes", "qt": "no" } },
"webp": { "type": "enum", "name": "system-webp", "values": { "system": "yes", "qt": "no" } },
"webp": { "type": "enum", "name": "system-libwebp", "values": { "system": "yes", "qt": "no" } },
"pepper-plugins": "boolean",
"printing-and-pdf": "boolean",
"proprietary-codecs": "boolean",
......@@ -436,8 +436,9 @@
"native-spellchecker": {
"label": "Native Spellchecker",
"purpose": "Provides a native spellchecker.",
"condition": "config.macos",
"section": "WebEngine",
"autoDetect": false,
"condition": "config.macos && features.spellchecker",
"output": [ "privateFeature" ]
},
"ui-delegates": {
......@@ -461,7 +462,7 @@
"condition": "config.unix && !config.darwin && libs.nss",
"output": [ "privateFeature" ]
},
"system-webp": {
"system-libwebp": {
"label": "libwebp, libwebpmux and libwebpdemux",
"autoDetect": "config.unix",
"condition": "libs.webp",
......@@ -476,7 +477,7 @@
"system-ffmpeg": {
"label": "ffmpeg",
"autoDetect": false,
"condition": "libs.ffmpeg && features.system-opus && features.system-webp",
"condition": "libs.ffmpeg && features.system-opus && features.system-libwebp",
"output": [ "privateFeature" ]
},
"system-icu": {
......@@ -572,7 +573,7 @@
"entries": [
"system-re2",
"system-icu",
"system-webp",
"system-libwebp",
"system-opus",
"system-ffmpeg",
"system-libvpx",
......
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
TEMPLATE = app
TARGET = spellchecker
QT += webenginewidgets
CONFIG += c++11
contains(WEBENGINE_CONFIG, use_native_spellchecker) {
qtConfig(native-spellchecker) {
error("Spellcheck example can not be built when using native OS dictionaries.")
}
......
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
TEMPLATE=subdirs
SUBDIRS += \
......@@ -12,10 +15,9 @@ SUBDIRS += \
qtHaveModule(positioning): SUBDIRS += maps
contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
!contains(WEBENGINE_CONFIG, use_native_spellchecker) {
SUBDIRS += spellchecker
} else {
message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
}
qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile {
SUBDIRS += spellchecker
} else {
message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
}
......@@ -4,7 +4,6 @@ load(functions)
load(platform)
defineTest(runConfigure) {
webengine_successfully_configured: return(true)
!exists(src/3rdparty/chromium) {
skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
......@@ -48,26 +47,6 @@ defineTest(runConfigure) {
return(false)
}
qtConfig(pepper-plugins): WEBENGINE_CONFIG += use_pepper_plugins
qtConfig(printing-and-pdf): WEBENGINE_CONFIG += use_printing use_pdf
qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs
qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker
qtConfig(webrtc): WEBENGINE_CONFIG += use_webrtc
qtConfig(embedded): WEBENGINE_CONFIG += embedded_build
qtConfig(system-webp): WEBENGINE_CONFIG += use_system_libwebp
qtConfig(system-opus): WEBENGINE_CONFIG += use_system_opus
qtConfig(system-ffmpeg): WEBENGINE_CONFIG += use_system_ffmpeg
qtConfig(system-icu): WEBENGINE_CONFIG += use_system_icu
qtConfig(system-re2): WEBENGINE_CONFIG += use_system_re2
!contains(WEBENGINE_CONFIG, use_system_libwebp): WEBENGINE_CONFIG += use_bundled_libwebp
!contains(WEBENGINE_CONFIG, use_system_opus): WEBENGINE_CONFIG += use_bundled_opus
!contains(WEBENGINE_CONFIG, use_system_ffmpeg): WEBENGINE_CONFIG += use_bundled_ffmpeg
!contains(WEBENGINE_CONFIG, use_system_icu): WEBENGINE_CONFIG += use_bundled_icu
qtConfig(appstore-compliant): WEBENGINE_CONFIG += use_appstore_compliant_code
optimize_size: WEBENGINE_CONFIG += reduce_binary_size
sanitizer: !qtConfig(webengine-sanitizer) {
skipBuild("Chosen sanitizer configuration is not supported. Use --feature-webengine-sanitizer=yes to force build with the chosen sanitizer configuration.")
return(false);
......@@ -93,9 +72,7 @@ defineTest(runConfigure) {
}
}
WEBENGINE_CONFIG += use_nss
!contains(WEBENGINE_CONFIG, embedded_build): qtConfig(xcb) {
!qtConfig(embedded): qtConfig(xcb) {
for(package, $$list("libdrm xcomposite xcursor xi xrandr xtst")) {
!qtConfig(system-$$package) {
skipBuild("A suitable version of $$package could not be found.")
......@@ -103,47 +80,6 @@ defineTest(runConfigure) {
}
}
}
# Fix me: mamke system-png a public feature in gui
qtConfig(system-png): qtConfig(webengine-system-png) {
WEBENGINE_CONFIG += use_system_libpng
}
# Fix me: make system-harfbuzz a public feautre in gui
qtConfig(system-harfbuzz): qtConfig(webengine-system-harfbuzz) {
WEBENGINE_CONFIG += use_system_harfbuzz
}
qtConfig(system-glib) {
WEBENGINE_CONFIG += use_glib
}
qtConfig(system-minizip) {
WEBENGINE_CONFIG += use_system_minizip
}
qtConfig(system-zlib) {
WEBENGINE_CONFIG += use_system_zlib
}
qtConfig(system-libxml2) {
WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2
}
for(package, $$list("libevent jsoncpp protobuf libvpx libsrtp snappy")) {
qtConfig(system-$$package) {
WEBENGINE_CONFIG += use_system_$$package
} else {
WEBENGINE_CONFIG += use_bundled_$$package
}
}
}
isEmpty(skipBuildReason) {
cache(CONFIG, add, $$list(webengine_successfully_configured))
!isEmpty(WEBENGINE_CONFIG) {
cache(WEBENGINE_CONFIG, add, $$list($$WEBENGINE_CONFIG))
export(WEBENGINE_CONFIG)
}
}
macos:qtConfig(native-spellchecker) {
WEBENGINE_CONFIG+=use_native_spellchecker
}
}
......@@ -47,11 +47,6 @@ defineReplace(which) {
return($$out)
}
defineTest(use?) {
contains(WEBENGINE_CONFIG, use_$$lower($$1)): return(true)
return(false)
}
# Returns the unquoted path to the python executable.
defineReplace(pythonPath) {
isEmpty(QMAKE_PYTHON2) {
......@@ -88,7 +83,7 @@ defineReplace(gnPath) {
defineReplace(gnArgs) {
linux {
contains(WEBENGINE_CONFIG, embedded_build): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri)
qtConfig(embedded): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri)
else: include($$QTWEBENGINE_ROOT/src/core/config/desktop_linux.pri)
}
macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri)
......
......@@ -13,37 +13,33 @@ gn_args += \
treat_warnings_as_errors=false \
enable_swiftshader=false
use?(printing) {
qtConfig(printing-and-pdf) {
gn_args += enable_basic_printing=true enable_print_preview=true
} else {
gn_args += enable_basic_printing=false enable_print_preview=false
}
use?(pdf) {
gn_args += enable_pdf=true
} else {
gn_args += enable_basic_printing=false enable_print_preview=false
gn_args += enable_pdf=false
}
use?(pepper_plugins) {
qtConfig(pepper-plugins) {
gn_args += enable_plugins=true enable_widevine=true
} else {
gn_args += enable_plugins=false enable_widevine=false
}
use?(spellchecker) {
qtConfig(spellchecker) {
gn_args += enable_spellcheck=true
} else {
gn_args += enable_spellcheck=false
}
use?(webrtc) {
qtConfig(webrtc) {
gn_args += enable_webrtc=true
} else {
gn_args += enable_webrtc=false
}
use?(proprietary_codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
qtConfig(proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
CONFIG(release, debug|release) {
force_debug_info {
......@@ -63,4 +59,4 @@ CONFIG(debug, debug|release) {
!v8base_debug: gn_args += remove_v8base_debug_symbols=true
# Compiling with -Os makes a huge difference in binary size
contains(WEBENGINE_CONFIG, reduce_binary_size): gn_args += optimize_for_size=true
optimize_size: gn_args += optimize_for_size=true
......@@ -5,8 +5,4 @@ gn_args += \
enable_session_service=false \
toolkit_views=false
use?(icecc) {
gn_args += use_debug_fission=false
}
!use_gold_linker: gn_args += use_gold=false
......@@ -11,7 +11,3 @@ gn_args += \
ozone_platform_external=true \
ozone_platform=\"qt\" \
toolkit_views=false
use?(icecc) {
gn_args += use_debug_fission=false
}
......@@ -8,17 +8,10 @@ gn_args += \
use_gio=false \
use_gnome_keyring=false \
use_kerberos=false \
linux_use_bundled_binutils=false
linux_use_bundled_binutils=false \
use_nss_certs=true \
use_openssl_certs=false
use?(nss) {
gn_args += \
use_nss_certs=true \
use_openssl_certs=false
} else {
gn_args += \
use_nss_certs=false \
use_openssl_certs=true
}
gcc:!clang: greaterThan(QT_GCC_MAJOR_VERSION, 5): gn_args += no_delete_null_pointer_checks=true
clang {
......@@ -119,15 +112,20 @@ host_build {
# Strip '>2 /dev/null' from $$pkgConfigExecutable()
PKGCONFIG = $$first($$list($$pkgConfigExecutable()))
gn_args += pkg_config=\"$$PKGCONFIG\"
gn_args += "host_pkg_config=\"pkg-config\""
gn_args += host_pkg_config=\"pkg-config\"
}
qtConfig(system-zlib): use?(system_minizip): gn_args += use_system_zlib=true use_system_minizip=true
use?(system_libpng): gn_args += use_system_libpng=true
qtConfig(system-zlib): qtConfig(system-minizip): gn_args += use_system_zlib=true use_system_minizip=true
# FIXME: make system-png a public feature in gui
qtConfig(system-png): qtConfig(webengine-system-png): gn_args += use_system_libpng=true
qtConfig(system-jpeg): gn_args += use_system_libjpeg=true
qtConfig(system-freetype): gn_args += use_system_freetype=true
use?(system_harfbuzz): gn_args += use_system_harfbuzz=true
!use?(glib): gn_args += use_glib=false
# FIXME: make system-harfbuzz a public feautre in gui
qtConfig(system-harfbuzz): qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true
qtConfig(system-glib): gn_args += use_glib=false
qtConfig(pulseaudio) {
gn_args += use_pulseaudio=true
} else {
......@@ -143,15 +141,18 @@ host_build {
!packagesExist(libpci): gn_args += use_libpci=false
!packagesExist(xscrnsaver): gn_args += use_xscrnsaver=false
use?(system_libevent): gn_args += use_system_libevent=true
use?(system_libwebp): gn_args += use_system_libwebp=true
use?(system_libxslt): gn_args += use_system_libxml=true use_system_libxslt=true
#use?(system_jsoncpp): gn_args += use_system_jsoncpp=true
use?(system_opus): gn_args += use_system_opus=true
use?(system_snappy): gn_args += use_system_snappy=true
use?(system_libvpx): gn_args += use_system_libvpx=true
use?(system_icu): gn_args += use_system_icu=true icu_use_data_file=false
use?(system_ffmpeg): gn_args += use_system_ffmpeg=true
use?(system_re2): gn_args += use_system_re2=true
#use?(system_protobuf): gn_args += use_system_protobuf=true
qtConfig(system-libevent): gn_args += use_system_libevent=true
qtConfig(system-libwebp): gn_args += use_system_libwebp=true
qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true
qtConfig(system-opus): gn_args += use_system_opus=true
qtConfig(system-snappy): gn_args += use_system_snappy=true
qtConfig(system-libvpx): gn_args += use_system_libvpx=true
qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false
qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true
qtConfig(system-re2): gn_args += use_system_re2=true
# FIXME:
#qtConfig(system-protobuf): gn_args += use_system_protobuf=true
#qtConfig(system-jsoncpp): gn_args += use_system_jsoncpp=true
#qtConfig(system-libsrtp: gn_args += use_system_libsrtp=true
}
......@@ -32,9 +32,9 @@ gn_args += \
toolkit_views=false \
use_external_popup_menu=false
use?(spellchecker) {
use?(native_spellchecker): gn_args += use_browser_spellchecker=true
qtConfig(spellchecker) {
qtConfig(native-spellchecker): gn_args += use_browser_spellchecker=true
else: gn_args += use_browser_spellchecker=false
} else {
macos: gn_args += use_browser_spellchecker=false
gn_args += use_browser_spellchecker=false
}
......@@ -28,7 +28,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
# Assume that we want mobile touch and low-end hardware behaviors
# whenever we are cross compiling.
contains(WEBENGINE_CONFIG, embedded_build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
qtConfig(embedded): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
qtConfig(egl): CONFIG += egl
......@@ -187,13 +187,8 @@ HEADERS = \
web_engine_settings.h \
web_event_factory.h
qtConfig(pepper-plugins) {
use?(pdf) {
SOURCES += pdfium_document_wrapper_qt.cpp
HEADERS += pdfium_document_wrapper_qt.h
}
use?(pepper_plugins) {
SOURCES += \
renderer_host/pepper/pepper_flash_browser_host_qt.cpp \
renderer_host/pepper/pepper_host_factory_qt.cpp \
......@@ -209,7 +204,8 @@ use?(pepper_plugins) {
renderer/pepper/pepper_renderer_host_factory_qt.h
}
use?(printing) {
qtConfig(printing-and-pdf) {
SOURCES += \
printing_message_filter_qt.cpp \
print_view_manager_base_qt.cpp \
......@@ -221,6 +217,10 @@ use?(printing) {
print_view_manager_base_qt.h \
print_view_manager_qt.h \
renderer/print_web_view_helper_delegate_qt.h
# pdf sources
SOURCES += pdfium_document_wrapper_qt.cpp
HEADERS += pdfium_document_wrapper_qt.h
}
contains(QT_CONFIG, opengl) {
......
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
include(core_gn_config.pri)
TEMPLATE = lib
......
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
MODULE = webenginecore
include(core_common.pri)
......@@ -110,7 +113,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
resources.path = $$[QT_INSTALL_DATA]/resources
INSTALLS += locales resources
!use?(system_icu) {
!qtConfig(system-icu) {
icu.CONFIG += no_check_exist
icu.path = $$[QT_INSTALL_DATA]/resources
INSTALLS += icu
......@@ -122,7 +125,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
# Copy essential files to the qtbase build directory for non-prefix builds
#
!use?(system_icu) {
!qtConfig(system-icu) {
COPIES += icu
}
......
......@@ -20,7 +20,7 @@ SUBDIRS += buildtools \
plugins
use?(spellchecker):!use?(native_spellchecker):!cross_compile {
qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile {
SUBDIRS += qwebengine_convert_dict
qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
qwebengine_convert_dict.depends = core
......
......@@ -67,11 +67,11 @@ qtConfig(testsupport) {
DEFINES += ENABLE_QML_TESTSUPPORT_API
}
contains(WEBENGINE_CONFIG, use_spellchecker) {
qtConfig(spellchecker) {
DEFINES += ENABLE_SPELLCHECK
}
use?(pdf) {
qtConfig(printing-and-pdf) {
DEFINES += ENABLE_PDF
}
......
......@@ -51,17 +51,14 @@ qtConfig(ui-delegates) {
DEFINES += QT_UI_DELEGATES
}
contains(WEBENGINE_CONFIG, use_spellchecker) {
qtConfig(spellchecker) {
DEFINES += ENABLE_SPELLCHECK
}
use?(printing) {
qtConfig(printing-and-pdf) {
DEFINES += ENABLE_PRINTING
QT += printsupport
}
use?(pdf) {
DEFINES += ENABLE_PDF
QT += printsupport
}
load(qt_module)
......@@ -5,7 +5,7 @@ QT_PRIVATE += webengine-private gui-private
HEADERS += ../shared/util.h
use?(pdf) {
qtConfig(printing-and-pdf) {
DEFINES += ENABLE_PDF
}
include(../tests.pri)
QT *= core-private
contains(WEBENGINE_CONFIG, use_pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED
qtConfig(printing-and-pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
TEMPLATE = app
CONFIG += testcase
......
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
TEMPLATE = subdirs
SUBDIRS += \
......@@ -14,8 +17,8 @@ SUBDIRS += \
qwebenginesettings \
qwebengineview
contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
!contains(WEBENGINE_CONFIG, use_native_spellchecker) {
qtConfig(spellchecker):!cross_compile {
!qtConfig(native-spellchecker) {
SUBDIRS += qwebenginespellcheck
} else {
message("Spellcheck test will not be built because it depends on usage of Hunspell dictionaries.")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment