summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-09-25 10:19:35 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-12-08 08:48:04 +0100
commite12b5932e64bad00162a1954a694d111e8a5ec35 (patch)
tree0f5d7f3edccc3a09cab5edc24b0a0aecef0491d8
parentb719da05c6429d72f4e0e0af44da0bf3f3e57984 (diff)
Add qt static deps when doing static build
Add qtfreetype, qthurfbuzz, qtlibpng, qtlibpng static 3rdparty libs. If qtbase has some 3rdaprty libs, which are also present in chromium. This leads to duplicated symbols and can lead to unexpected issues with application. Currently we do only static builds for qtpdf, therefore this changes only affects qtpdf builds. If qtfreetype is used, hurfbuzz dependency is not used, qtlibpng is only used when pdf compiled with xfa. Task-number: QTBUG-87154 Change-Id: Ibba528268d9c989a2c63c1a7881ba0c95c325437 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/buildtools/configure.json30
-rw-r--r--src/pdf/config/common.pri20
-rw-r--r--src/pdf/pdfcore.pro6
3 files changed, 56 insertions, 0 deletions
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 1ca6214a0..e6de2c1f3 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -541,6 +541,11 @@
"condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz",
"output": [ "privateFeature" ]
},
+ "webengine-qt-harfbuzz" : {
+ "label": "qtharfbuzz",
+ "condition": "config.static && !features.system-harfbuzz && features.harfbuzz",
+ "output": [ "privateFeature" ]
+ },
"webengine-system-glib" : {
"label": "glib",
"condition": "config.unix && libs.webengine-glib",
@@ -576,11 +581,21 @@
"condition": "config.unix && features.system-png && libs.webengine-png",
"output": [ "privateFeature" ]
},
+ "webengine-qt-png" : {
+ "label": "qtlibpng",
+ "condition" : "config.static && !features.system-png && features.png",
+ "output": [ "privateFeature" ]
+ },
"webengine-system-jpeg" : {
"label": "JPEG",
"condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib",
"output": [ "privateFeature" ]
},
+ "webengine-qt-jpeg" : {
+ "label": "qtlibjpeg",
+ "condition": "config.static && !features.system-jpeg && features.jpeg",
+ "output": [ "privateFeature" ]
+ },
"webengine-system-re2": {
"label": "re2",
"condition": "config.unix && libs.webengine-re2",
@@ -623,6 +638,11 @@
"condition": "config.unix && features.system-freetype && libs.webengine-freetype",
"output": [ "privateFeature" ]
},
+ "webengine-qt-freetype" : {
+ "label": "qtfreetype",
+ "condition": "config.static && !features.system-freetype && features.freetype",
+ "output": [ "privateFeature" ]
+ },
"webengine-system-libvpx" : {
"label": "libvpx",
"condition": "config.unix && libs.webengine-libvpx",
@@ -783,6 +803,16 @@
"webengine-system-harfbuzz",
"webengine-system-freetype"
]
+ },
+ {
+ "section": "Qt 3rdparty libs",
+ "condition": "config.static",
+ "entries": [
+ "webengine-qt-freetype",
+ "webengine-qt-harfbuzz",
+ "webengine-qt-png",
+ "webengine-qt-jpeg"
+ ]
}
]
}
diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri
index dd5bfa293..66021c635 100644
--- a/src/pdf/config/common.pri
+++ b/src/pdf/config/common.pri
@@ -1,6 +1,26 @@
include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
QT_FOR_CONFIG += pdf-private
+qtConfig(webengine-qt-png) {
+ gn_args += pdfium_use_qt_libpng=true
+ gn_args += "pdfium_qt_libpng_includes=\"$$system_path($$QMAKE_INCDIR_LIBPNG)\""
+}
+
+qtConfig(webengine-qt-jpeg) {
+ gn_args += use_qt_libjpeg=true
+ gn_args += "qt_libjpeg_includes=\"$$system_path($$QMAKE_INCDIR_LIBJPEG)\""
+}
+
+qtConfig(webengine-qt-harfbuzz) {
+ gn_args += use_qt_harfbuzz=true
+ gn_args += "qt_harfbuzz_includes=\"$$system_path($$QMAKE_INCDIR_HARFBUZZ)\""
+}
+
+qtConfig(webengine-qt-freetype) {
+ gn_args += use_qt_freetype=true
+ gn_args += "qt_freetype_includes=\"$$system_path($$QMAKE_INCDIR_FREETYPE)\""
+}
+
qtConfig(pdf-v8) {
gn_args += pdf_enable_v8=true
} else {
diff --git a/src/pdf/pdfcore.pro b/src/pdf/pdfcore.pro
index 2dfe39dc0..5ce7ed871 100644
--- a/src/pdf/pdfcore.pro
+++ b/src/pdf/pdfcore.pro
@@ -77,4 +77,10 @@ HEADERS += \
api/qpdfselection.h \
api/qpdfselection_p.h \
+
+qtConfig(webengine-qt-freetype): QMAKE_USE_PRIVATE+= freetype
+qtConfig(webengine-qt-png): QMAKE_USE_PRIVATE+= libpng
+qtConfig(webengine-qt-harfbuzz): QMAKE_USE_PRIVATE+= harfbuzz
+qtConfig(webengine-qt-jpeg): QMAKE_USE_PRIVATE+= libjpeg
+
load(qt_module)