summaryrefslogtreecommitdiffstats
path: root/src/pdf
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-29 09:27:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-29 09:27:09 +0200
commitbdeb49e55617ce42fd7d93075badec5f147bedf8 (patch)
treedb1089078d3b15495d041c2ab3dddc9f81d30d44 /src/pdf
parent4bdccc8abcd7ab3a80c0d84fd005452d5ffceb6b (diff)
parent1a26c0ace958c3604c8a751134429dd38168a1a1 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/src.pro Change-Id: I03c260ba676296f93d8137e79b46f3978f5f41ef
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/config/common.pri38
-rw-r--r--src/pdf/config/ios.pri66
-rw-r--r--src/pdf/gn_run.pro4
-rw-r--r--src/pdf/pdf.pro25
-rw-r--r--src/pdf/pdfcore_generator.pro2
5 files changed, 125 insertions, 10 deletions
diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri
new file mode 100644
index 000000000..dd5bfa293
--- /dev/null
+++ b/src/pdf/config/common.pri
@@ -0,0 +1,38 @@
+include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
+QT_FOR_CONFIG += pdf-private
+
+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/pdf/config/ios.pri b/src/pdf/config/ios.pri
new file mode 100644
index 000000000..5dc7faf9d
--- /dev/null
+++ b/src/pdf/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/pdf/gn_run.pro b/src/pdf/gn_run.pro
index 87070fd81..70ee582a9 100644
--- a/src/pdf/gn_run.pro
+++ b/src/pdf/gn_run.pro
@@ -29,9 +29,7 @@ build_pass|!debug_and_release {
runninja.target = run_ninja
# fixme: refine args
- gn_args = $$gnArgs()
-
- include($$QTWEBENGINE_ROOT/src/buildtools/config/pdf.pri)
+ gn_args = $$gnPdfArgs()
# fixme: qtwebengine_target
gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtPdf\""
diff --git a/src/pdf/pdf.pro b/src/pdf/pdf.pro
index c5513ce93..fcdfafab5 100644
--- a/src/pdf/pdf.pro
+++ b/src/pdf/pdf.pro
@@ -1,3 +1,5 @@
+include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
+QT_FOR_CONFIG += buildtools-private
TEMPLATE = subdirs
pdfcore.file = pdfcore.pro
pdfcore_generator.file = pdfcore_generator.pro
@@ -7,10 +9,21 @@ gn_run.depends = pdfcore_generator
pdfcore.depends = gn_run
quick.depends = pdfcore
-SUBDIRS += \
- pdfcore_generator \
- gn_run \
- pdfcore \
- quick
-
+!qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf)::!build_pass {
+ !qtwebengine_makeCheckPdfError() {
+ errorbuild.commands = @echo $$shell_quote("QtPdf will not be built. $${skipBuildReason}")
+ } else {
+ errorbuild.commands = @echo $$shell_quote("QtPdf module will not be built for unknown reason, please open a bug report at https://bugreports.qt.io")
+ }
+ errorbuild.CONFIG = phony
+ QMAKE_EXTRA_TARGETS += errorbuild
+ first.depends += errorbuild
+ QMAKE_EXTRA_TARGETS += first
+} else {
+ SUBDIRS += \
+ pdfcore_generator \
+ gn_run \
+ pdfcore \
+ quick
+}
diff --git a/src/pdf/pdfcore_generator.pro b/src/pdf/pdfcore_generator.pro
index c8eb13b81..e5c7258b7 100644
--- a/src/pdf/pdfcore_generator.pro
+++ b/src/pdf/pdfcore_generator.pro
@@ -3,7 +3,7 @@ qtConfig(debug_and_release): CONFIG += debug_and_release
TARGET = QtPdf
TEMPLATE = lib
CONFIG = gn_generator $$CONFIG
-ios: CONFIG -=static # note we still do static on ios when linking
+CONFIG -=static # note we still do static when linking
GN_SRC_DIR = $$PWD
GN_FILE = $$OUT_PWD/$$getConfigDir()/BUILD.gn
GN_FIND_MOCABLES_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_find_mocables.py)