Skip to content

Commit 546e741

Browse files
Michal Klocekpatricia-gallardo
Michal Klocek
authored andcommitted
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 <[email protected]>
1 parent 4ce52ae commit 546e741

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

src/buildtools/configure.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@
541541
"condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz",
542542
"output": [ "privateFeature" ]
543543
},
544+
"webengine-qt-harfbuzz" : {
545+
"label": "qtharfbuzz",
546+
"condition": "config.static && !features.system-harfbuzz && features.harfbuzz",
547+
"output": [ "privateFeature" ]
548+
},
544549
"webengine-system-glib" : {
545550
"label": "glib",
546551
"condition": "config.unix && libs.webengine-glib",
@@ -576,11 +581,21 @@
576581
"condition": "config.unix && features.system-png && libs.webengine-png",
577582
"output": [ "privateFeature" ]
578583
},
584+
"webengine-qt-png" : {
585+
"label": "qtlibpng",
586+
"condition" : "config.static && !features.system-png && features.png",
587+
"output": [ "privateFeature" ]
588+
},
579589
"webengine-system-jpeg" : {
580590
"label": "JPEG",
581591
"condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib",
582592
"output": [ "privateFeature" ]
583593
},
594+
"webengine-qt-jpeg" : {
595+
"label": "qtlibjpeg",
596+
"condition": "config.static && !features.system-jpeg && features.jpeg",
597+
"output": [ "privateFeature" ]
598+
},
584599
"webengine-system-re2": {
585600
"label": "re2",
586601
"condition": "config.unix && libs.webengine-re2",
@@ -623,6 +638,11 @@
623638
"condition": "config.unix && features.system-freetype && libs.webengine-freetype",
624639
"output": [ "privateFeature" ]
625640
},
641+
"webengine-qt-freetype" : {
642+
"label": "qtfreetype",
643+
"condition": "config.static && !features.system-freetype && features.freetype",
644+
"output": [ "privateFeature" ]
645+
},
626646
"webengine-system-libvpx" : {
627647
"label": "libvpx",
628648
"condition": "config.unix && libs.webengine-libvpx",
@@ -783,6 +803,16 @@
783803
"webengine-system-harfbuzz",
784804
"webengine-system-freetype"
785805
]
806+
},
807+
{
808+
"section": "Qt 3rdparty libs",
809+
"condition": "config.static",
810+
"entries": [
811+
"webengine-qt-freetype",
812+
"webengine-qt-harfbuzz",
813+
"webengine-qt-png",
814+
"webengine-qt-jpeg"
815+
]
786816
}
787817
]
788818
}

src/pdf/config/common.pri

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
22
QT_FOR_CONFIG += pdf-private
33

4+
qtConfig(webengine-qt-png) {
5+
gn_args += pdfium_use_qt_libpng=true
6+
gn_args += "pdfium_qt_libpng_includes=\"$$system_path($$QMAKE_INCDIR_LIBPNG)\""
7+
}
8+
9+
qtConfig(webengine-qt-jpeg) {
10+
gn_args += use_qt_libjpeg=true
11+
gn_args += "qt_libjpeg_includes=\"$$system_path($$QMAKE_INCDIR_LIBJPEG)\""
12+
}
13+
14+
qtConfig(webengine-qt-harfbuzz) {
15+
gn_args += use_qt_harfbuzz=true
16+
gn_args += "qt_harfbuzz_includes=\"$$system_path($$QMAKE_INCDIR_HARFBUZZ)\""
17+
}
18+
19+
qtConfig(webengine-qt-freetype) {
20+
gn_args += use_qt_freetype=true
21+
gn_args += "qt_freetype_includes=\"$$system_path($$QMAKE_INCDIR_FREETYPE)\""
22+
}
23+
424
qtConfig(pdf-v8) {
525
gn_args += pdf_enable_v8=true
626
} else {

src/pdf/pdfcore.pro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,10 @@ HEADERS += \
7777
api/qpdfselection.h \
7878
api/qpdfselection_p.h \
7979

80+
81+
qtConfig(webengine-qt-freetype): QMAKE_USE_PRIVATE+= freetype
82+
qtConfig(webengine-qt-png): QMAKE_USE_PRIVATE+= libpng
83+
qtConfig(webengine-qt-harfbuzz): QMAKE_USE_PRIVATE+= harfbuzz
84+
qtConfig(webengine-qt-jpeg): QMAKE_USE_PRIVATE+= libjpeg
85+
8086
load(qt_module)

0 commit comments

Comments
 (0)