diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-07-20 12:31:50 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-07-23 15:12:57 +0200 |
commit | 91b6803038298cdd30f3b8817b1b06d4ad2afd93 (patch) | |
tree | 9b7df0aca6727afcb66d35ba9bb9f9e2a29d16a8 /src/pdf | |
parent | e0a67c6fce6c97053d9e917623dd3d29aba63ca5 (diff) |
Fix prl generation in sub modules of webengine repo
QtPdf and QtWebEngine builds are producing few libraries in one build.
This creates some corner cases like prl file generation. Paths
in prl files are replaced on installation with sed. Unfortunately this
will not work well if we build libraries which depends on not yet
installed libs, since prl files reused by build are not processed by sed.
Add workaround in this case so all depend libs are aware of their static
dependencies and generate correct prl files.
Task-number: QTBUG-85616
Change-Id: I0dbeb96bccbc4865dd52dea7c5d619f8cda1a596
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/pdf.pro | 6 | ||||
-rw-r--r-- | src/pdf/pdfcore.pro | 15 | ||||
-rw-r--r-- | src/pdf/pdfcore_prl_generator.pro | 27 | ||||
-rw-r--r-- | src/pdf/quick/quick.pro | 2 |
4 files changed, 37 insertions, 13 deletions
diff --git a/src/pdf/pdf.pro b/src/pdf/pdf.pro index fcdfafab5..9f98c32b0 100644 --- a/src/pdf/pdf.pro +++ b/src/pdf/pdf.pro @@ -4,9 +4,10 @@ TEMPLATE = subdirs pdfcore.file = pdfcore.pro pdfcore_generator.file = pdfcore_generator.pro gn_run.file = gn_run.pro - +pdfcore_prl_generator.file = pdfcore_prl_generator.pro gn_run.depends = pdfcore_generator -pdfcore.depends = gn_run +pdfcore_prl_generator.depends = gn_run +pdfcore.depends = pdfcore_prl_generator quick.depends = pdfcore !qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf)::!build_pass { @@ -23,6 +24,7 @@ quick.depends = pdfcore SUBDIRS += \ pdfcore_generator \ gn_run \ + pdfcore_prl_generator \ pdfcore \ quick } diff --git a/src/pdf/pdfcore.pro b/src/pdf/pdfcore.pro index edc474105..df9c67232 100644 --- a/src/pdf/pdfcore.pro +++ b/src/pdf/pdfcore.pro @@ -58,17 +58,12 @@ ios: OBJECTS += $$NINJA_OBJECTS # install static dependencies and handle prl files for static builds -static { - ninja_archives = $$eval($$list($$NINJA_ARCHIVES)) - qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS] - for(ninja_arch, ninja_archives) { - ninja_arch_name = $$basename(ninja_arch) - ninja_arch_dirname = $$dirname(ninja_arch) - ninja_arch_prl_replace_$${ninja_arch_name}.match = $${ninja_arch_dirname} - ninja_arch_prl_replace_$${ninja_arch_name}.replace = $${qqt_libdir}/static_chrome - ninja_arch_prl_replace_$${ninja_arch_name}.CONFIG = path - QMAKE_PRL_INSTALL_REPLACE += ninja_arch_prl_replace_$${ninja_arch_name} +static:!isEmpty(NINJA_ARCHIVES) { + static_dep_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}_static_dep.pri + !include($${static_dep_pri}) { + error("Could not find the prl information.") } + ninja_archives = $$eval($$list($$NINJA_ARCHIVES)) ninja_archs_install.files = $${ninja_archives} ninja_archs_install.path = $$[QT_INSTALL_LIBS]/static_chrome ninja_archs_install.CONFIG = no_check_exist diff --git a/src/pdf/pdfcore_prl_generator.pro b/src/pdf/pdfcore_prl_generator.pro new file mode 100644 index 000000000..39fdaed40 --- /dev/null +++ b/src/pdf/pdfcore_prl_generator.pro @@ -0,0 +1,27 @@ + +qtConfig(debug_and_release): CONFIG += debug_and_release + +TARGET = QtPdf +TEMPLATE = aux + +build_pass|!debug_and_relase { + linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri + !include($$linking_pri) { + error("Could not find the linking information that gn should have generated.") + } + + !isEmpty(NINJA_ARCHIVES) { + prl_file = $$OUT_PWD/$$getConfigDir()/$${TARGET}_static_dep.pri + ninja_archives = $$eval($$list($$NINJA_ARCHIVES)) + qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS] + for(ninja_arch, ninja_archives) { + ninja_arch_name = $$basename(ninja_arch) + ninja_arch_dirname = $$dirname(ninja_arch) + prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.match = $${ninja_arch_dirname}" + prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.replace = $${qqt_libdir}/static_chrome" + prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.CONFIG = path" + prl_content += "QMAKE_PRL_INSTALL_REPLACE += ninja_arch_prl_replace_$${ninja_arch_name}" + } + write_file($${prl_file}, prl_content) + } +} diff --git a/src/pdf/quick/quick.pro b/src/pdf/quick/quick.pro index bd6bc8827..47c559091 100644 --- a/src/pdf/quick/quick.pro +++ b/src/pdf/quick/quick.pro @@ -36,5 +36,5 @@ HEADERS += \ qquicktableviewextra_p.h \ QT += pdf pdf-private gui core qml quick quick-private - +include($${OUT_PWD}/../$$getConfigDir()/QtPdf_static_dep.pri) load(qml_plugin) |