summaryrefslogtreecommitdiffstats
path: root/src/buildtools
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2020-01-27 14:45:07 +0100
committerMichal Klocek <michal.klocek@qt.io>2020-01-27 13:54:33 +0000
commiteda1b89972f8a3c87d8929ec4bcea20aabb78ab6 (patch)
tree87d7f98634b1f072cbcfb95998dc1850d7ac7491 /src/buildtools
parentfe9de69e014457de39ddb09c5773f546613e9727 (diff)
parenta06650f819ef164e6ec83d69957bd60d77574a16 (diff)
Merge remote-tracking branch 'origin/wip/qtpdf' into 5.15
Initial merge of QtPdf into QtWebEngine. Fixes: QTBUG-69519 Change-Id: I48dc25a59f2c161bb231bd0fa60392eb70fe4e7d
Diffstat (limited to 'src/buildtools')
-rw-r--r--src/buildtools/config/common.pri21
-rw-r--r--src/buildtools/config/ios.pri66
-rw-r--r--src/buildtools/config/linux.pri20
-rw-r--r--src/buildtools/config/mac_osx.pri2
-rw-r--r--src/buildtools/config/pdf.pri36
-rw-r--r--src/buildtools/config/support.pri24
-rw-r--r--src/buildtools/config/windows.pri2
-rw-r--r--src/buildtools/configure.json33
8 files changed, 176 insertions, 28 deletions
diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri
index 97d39535c..9cd8cb089 100644
--- a/src/buildtools/config/common.pri
+++ b/src/buildtools/config/common.pri
@@ -39,7 +39,7 @@ greaterThan(QMAKE_JUMBO_MERGE_LIMIT,0) {
gn_args += jumbo_build_excluded="[\"browser\"]"
}
-qtConfig(webengine-printing-and-pdf) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-printing-and-pdf) {
gn_args += enable_basic_printing=true enable_print_preview=true
gn_args += enable_pdf=true
} else {
@@ -47,27 +47,31 @@ qtConfig(webengine-printing-and-pdf) {
gn_args += enable_pdf=false
}
-qtConfig(webengine-pepper-plugins) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-pepper-plugins) {
gn_args += enable_plugins=true
} else {
gn_args += enable_plugins=false
}
-qtConfig(webengine-spellchecker) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-spellchecker) {
gn_args += enable_spellcheck=true
} else {
gn_args += enable_spellcheck=false
}
-qtConfig(webengine-webrtc) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-webrtc) {
gn_args += enable_webrtc=true
} else {
gn_args += enable_webrtc=false audio_processing_in_audio_service_supported=false
}
-qtConfig(webengine-proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
+qtConfig(build-qtwebengine-core):qtConfig(webengine-proprietary-codecs) {
+ gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\"
+} else {
+ gn_args += proprietary_codecs=false
+}
-qtConfig(webengine-extensions) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-extensions) {
gn_args += enable_extensions=true
} else {
gn_args += enable_extensions=false
@@ -122,13 +126,13 @@ optimize_size: gn_args += optimize_for_size=true
sanitize_undefined: gn_args += is_ubsan=true is_ubsan_vptr=true
}
-qtConfig(webengine-v8-snapshot):qtConfig(webengine-v8-snapshot-support) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-v8-snapshot):qtConfig(webengine-v8-snapshot-support) {
gn_args += v8_use_snapshot=true
} else {
gn_args += v8_use_snapshot=false
}
-qtConfig(webengine-kerberos) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-kerberos) {
gn_args += use_kerberos=true
} else {
gn_args += use_kerberos=false
@@ -139,3 +143,4 @@ ccache {
}
qtConfig(force_asserts): gn_args += dcheck_always_on=true
+
diff --git a/src/buildtools/config/ios.pri b/src/buildtools/config/ios.pri
new file mode 100644
index 000000000..5dc7faf9d
--- /dev/null
+++ b/src/buildtools/config/ios.pri
@@ -0,0 +1,66 @@
+load(functions)
+
+include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
+include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
+QT_FOR_CONFIG += buildtools-private pdf-private
+
+clang_dir = $$which($${QMAKE_CXX})
+clang_dir = $$clean_path("$$dirname(clang_dir)/../")
+
+gn_args += \
+use_qt=true \
+closure_compile=false \
+is_component_build=false \
+is_shared=true \
+is_debug=true \
+enable_message_center=false \
+enable_nacl=false \
+enable_remoting=false \
+enable_reporting=false \
+enable_resource_whitelist_generation=false \
+enable_swiftshader=false \
+enable_web_speech=false \
+has_native_accessibility=false \
+enable_debugallocation=false \
+use_allocator_shim=false \
+use_allocator=\"none\" \
+use_custom_libcxx=false \
+v8_use_external_startup_data=false \
+v8_use_snapshot=false \
+toolkit_views=false \
+treat_warnings_as_errors=false \
+safe_browsing_mode=0 \
+optimize_webui=false \
+forbid_non_component_debug_builds=false \
+clang_use_chrome_plugins=false \
+use_xcode_clang=true \
+clang_base_path=\"$${clang_dir}\" \
+ios_enable_code_signing=false \
+target_os=\"ios\" \
+ios_deployment_target=\"$${QMAKE_IOS_DEPLOYMENT_TARGET}\" \
+enable_ios_bitcode=true \
+use_jumbo_build=false
+
+device:simulator {
+ # we do fat libray
+ gn_args+= \
+ target_cpu=\"$${QMAKE_APPLE_DEVICE_ARCHS}\" \
+ use_qt_fat_lib=true \
+ arm_use_neon=false\
+ # note this adds one arch of simulator at the moment, see also additional_target_cpus
+ target_sysroot=\"$$xcodeSDKInfo(Path, $$device.sdk)\" \
+ additional_target_sysroot=[\"$$xcodeSDKInfo(Path, $$simulator.sdk)\"]
+} else {
+ simulator {
+ equals(QMAKE_APPLE_SIMULATOR_ARCHS,"x86_64") {
+ gn_args+=target_cpu=\"x64\"
+ } else {
+ gn_args+=target_cpu=\"$${QMAKE_APPLE_SIMULATOR_ARCHS}\"
+ }
+ gn_args+=target_sysroot=\"$$xcodeSDKInfo(Path, $$simulator.sdk)\"
+ }
+ device {
+ gn_args+=target_cpu=\"$${QMAKE_APPLE_DEVICE_ARCHS}\"
+ gn_args+=target_sysroot=\"$$xcodeSDKInfo(Path, $$device.sdk)\"
+ }
+}
diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri
index ee08f81bc..add563f28 100644
--- a/src/buildtools/config/linux.pri
+++ b/src/buildtools/config/linux.pri
@@ -5,7 +5,7 @@ defineReplace(extractCFlag) {
return($$qtwebengine_extractCFlag($$1))
}
-QT_FOR_CONFIG += gui-private webenginecore-private
+QT_FOR_CONFIG += gui-private webenginecore-private pdf-private
gn_args += \
use_cups=false \
@@ -26,7 +26,7 @@ gn_args += \
ozone_platform=\"qt\" \
ozone_extra_path=\"$$QTWEBENGINE_ROOT/src/core/ozone/ozone_extra.gni\"
-qtConfig(webengine-embedded-build) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-embedded-build) {
gn_args += is_desktop_linux=false
}
@@ -92,7 +92,7 @@ contains(QT_ARCH, "arm") {
}
}
- qtConfig(webengine-arm-thumb) {
+ qtConfig(build-qtwebengine-core):qtConfig(webengine-arm-thumb) {
gn_args += arm_use_thumb=true # this adds -mthumb
} else {
gn_args += arm_use_thumb=false
@@ -158,11 +158,15 @@ host_build {
qtConfig(webengine-system-zlib) {
qtConfig(webengine-system-minizip): gn_args += use_system_zlib=true use_system_minizip=true
- qtConfig(webengine-printing-and-pdf): gn_args += pdfium_use_system_zlib=true
+ qtConfig(build-qtpdf) || qtConfig(webengine-printing-and-pdf) {
+ gn_args += pdfium_use_system_zlib=true
+ }
}
qtConfig(webengine-system-png) {
gn_args += use_system_libpng=true
- qtConfig(webengine-printing-and-pdf): gn_args += pdfium_use_system_libpng=true
+ qtConfig(build-qtpdf) || qtConfig(webengine-printing-and-pdf) {
+ gn_args += pdfium_use_system_libpng=true
+ }
}
qtConfig(webengine-system-jpeg) {
gn_args += use_system_libjpeg=true
@@ -180,19 +184,19 @@ host_build {
gn_args += use_system_harfbuzz=false
}
gn_args += use_glib=false
- qtConfig(webengine-pulseaudio) {
+ qtConfig(build-qtwebengine-core):qtConfig(webengine-pulseaudio) {
gn_args += use_pulseaudio=true
} else {
gn_args += use_pulseaudio=false
}
- qtConfig(webengine-alsa) {
+ qtConfig(build-qtwebengine-core):qtConfig(webengine-alsa) {
gn_args += use_alsa=true
} else {
gn_args += use_alsa=false
}
!packagesExist(libpci): gn_args += use_libpci=false
- qtConfig(webengine-ozone-x11) {
+ qtConfig(build-qtwebengine-core):qtConfig(webengine-ozone-x11) {
gn_args += ozone_platform_x11=true
packagesExist(xscrnsaver): gn_args += use_xscrnsaver=true
qtConfig(webengine-webrtc): gn_args += rtc_use_x11=true
diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri
index 3f2fe9c0a..a7ed61214 100644
--- a/src/buildtools/config/mac_osx.pri
+++ b/src/buildtools/config/mac_osx.pri
@@ -31,7 +31,7 @@ gn_args += \
mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \
use_external_popup_menu=false
-qtConfig(webengine-spellchecker) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-spellchecker) {
qtConfig(webengine-native-spellchecker): gn_args += use_browser_spellchecker=true
else: gn_args += use_browser_spellchecker=false
} else {
diff --git a/src/buildtools/config/pdf.pri b/src/buildtools/config/pdf.pri
new file mode 100644
index 000000000..4a1cf08e0
--- /dev/null
+++ b/src/buildtools/config/pdf.pri
@@ -0,0 +1,36 @@
+include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
+QT_FOR_CONFIG += pdf-private
+
+qtConfig(build-qtpdf) {
+ qtConfig(pdf-v8) {
+ gn_args += pdf_enable_v8=true
+ } else {
+ gn_args += pdf_enable_v8=false
+ }
+ qtConfig(pdf-xfa) {
+ gn_args += pdf_enable_xfa=true
+ } else {
+ gn_args += pdf_enable_xfa=false
+ }
+ qtConfig(pdf-xfa-bmp) {
+ gn_args += pdf_enable_xfa_bmp=true
+ } else {
+ gn_args += pdf_enable_xfa_bmp=false
+ }
+ qtConfig(pdf-xfa-gif) {
+ gn_args += pdf_enable_xfa_gif=true
+ } else {
+ gn_args += pdf_enable_xfa_gif=false
+ }
+ qtConfig(pdf-xfa-png) {
+ gn_args += pdf_enable_xfa_png=true
+ } else {
+ gn_args += pdf_enable_xfa_png=false
+ }
+ qtConfig(pdf-xfa-tiff) {
+ gn_args += pdf_enable_xfa_tiff=true
+ } else {
+ gn_args += pdf_enable_xfa_tiff=false
+ }
+}
+
diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
index 5bdd808d4..86ca2f80e 100644
--- a/src/buildtools/config/support.pri
+++ b/src/buildtools/config/support.pri
@@ -6,11 +6,6 @@ defineTest(qtwebengine_skipBuild) {
defineReplace(qtwebengine_checkError) {
- static {
- qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
- return(false)
- }
-
!qtHaveModule(gui) {
qtwebengine_skipBuild("QtWebEngine requires QtGui.")
return(false)
@@ -68,6 +63,7 @@ defineReplace(qtwebengine_checkError) {
linux:!qtwebengine_checkErrorForLinux():return(false)
win:!qtwebengine_checkErrorForWindows():return(false)
+ macos:!qtwebengine_checkErrorForMacOS():return(false)
sanitizer: !qtConfig(webengine-sanitizer) {
qtwebengine_skipBuild("Chosen sanitizer configuration is not supported for QtWebEngine. Check config.log for details or use -feature-webengine-sanitizer to force build with the chosen sanitizer configuration.")
@@ -77,8 +73,20 @@ defineReplace(qtwebengine_checkError) {
return(true)
}
+defineTest(qtwebengine_checkErrorFoMacOS) {
+ static {
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
+ return(false)
+ }
+}
+
defineTest(qtwebengine_checkErrorForLinux) {
+ static {
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
+ return(false)
+ }
+
!qtConfig(pkg-config) {
qtwebengine_skipBuild("A pkg-config support is required to build QtWebEngine.")
return(false)
@@ -114,6 +122,12 @@ defineTest(qtwebengine_checkErrorForLinux) {
}
defineTest(qtwebengine_checkErrorForWindows) {
+
+ static {
+ qtwebengine_skipBuild("Static builds of QtWebEngine are not supported.")
+ return(false)
+ }
+
!qtConfig(webengine-win-compiler64) {
qtwebengine_skipBuild("64-bit cross-building or native toolchain required to build QtWebEngine could not be found.")
return(false)
diff --git a/src/buildtools/config/windows.pri b/src/buildtools/config/windows.pri
index 5d7b7e1f2..2e5ebb876 100644
--- a/src/buildtools/config/windows.pri
+++ b/src/buildtools/config/windows.pri
@@ -89,7 +89,7 @@ msvc {
error("Qt WebEngine for Windows can only be built with a Microsoft Visual Studio C++ compatible compiler")
}
-qtConfig(webengine-spellchecker) {
+qtConfig(build-qtwebengine-core):qtConfig(webengine-spellchecker) {
qtConfig(webengine-native-spellchecker): gn_args += use_browser_spellchecker=true
else: gn_args += use_browser_spellchecker=false
} else {
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index f04fdae81..939d689fd 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -9,6 +9,7 @@
"commandline": {
"options": {
"build-qtwebengine-core": "boolean",
+ "build-qtpdf": "boolean",
"webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"}
}
},
@@ -389,6 +390,22 @@
&& (!config.win32 || features.webengine-winversion)",
"output": [ "privateFeature" ]
},
+ "webengine-qtpdf-support": {
+ "label": "Support Qt Pdf",
+ "condition": "module.gui
+ && features.webengine-python2
+ && features.webengine-gperf
+ && features.webengine-bison
+ && features.webengine-flex
+ && features.webengine-submodule
+ && features.webengine-nowhitespace
+ && features.webengine-arch-support
+ && !features.webengine-no-platform-support
+ && (!config.static || config.ios)
+ && (!config.linux || features.pkg-config)
+ && (!config.win32 || features.webengine-winversion)",
+ "output": [ "privateFeature" ]
+ },
"build-qtwebengine-core": {
"label": "Build Qt WebEngine Core",
"purpose": "Provides WebEngine Core support.",
@@ -681,7 +698,8 @@
"report": [
{
"type": "skipBuildWarning",
- "condition": "!features.webengine-core-support && (features.build-qtwebengine-core || features.build-qtpdf)",
+ "condition": "(!features.webengine-core-support && features.build-qtwebengine-core) ||
+ (!features.webengine-qtpdf-support && features.build-qtpdf)",
"message": "qtwebengine_confCheckError"
},
{
@@ -691,7 +709,7 @@
},
{
"type": "note",
- "condition": "features.webengine-core-support && !features.build-qtpdf",
+ "condition": "features.webengine-qtpdf-support && !features.build-qtpdf",
"message": "QtPdf build is disabled by user."
},
{
@@ -701,8 +719,13 @@
},
{
"type": "warning",
- "condition": "!features.webengine-core-support && features.build-qtpdf",
+ "condition": "!features.webengine-qtpdf-support && features.build-qtpdf",
"message": "QtPdf will not be built."
+ },
+ {
+ "type": "warning",
+ "condition": "config.ios && config.simulator && config.device && features.build-qtpdf",
+ "message": "Building fat libray with device and simulator architectures will disable NEON."
}
],
"summary": [
@@ -711,14 +734,14 @@
"entries": [
"webengine-system-ninja",
"webengine-system-gn",
- {
+ {
"message": "Jumbo Build Merge Limit",
"type": "jumboBuild"
},
"webengine-developer-build",
{
"section": "QtWebEngine required system libraries",
- "condition": "config.unix && !config.macos",
+ "condition": "config.unix && !config.macos && !config.ios",
"entries": [
"webengine-system-fontconfig",
"webengine-system-dbus",