summaryrefslogtreecommitdiffstats
path: root/src/pdf
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-05-20 17:31:21 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-05-28 11:06:51 +0200
commit551a519c00f26fcafc5d3615d55b2fe205ffbbf3 (patch)
treee9f158ec8d2719c0ed7e6473134c4b7541265c61 /src/pdf
parentf79694b899c425395146f85be02344ba50a2fd8b (diff)
Split gn args for pdf and webengine
Currently we run gn with same sets of arguments for pdf and webengine. Split those so we can make fine grain configuration and drop some requirements. Change-Id: I40890b5475dddadd0798ea091ca5e7143fd952b3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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
3 files changed, 105 insertions, 3 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\""