summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pdf/pdf.pro6
-rw-r--r--src/pdf/pdfcore.pro15
-rw-r--r--src/pdf/pdfcore_prl_generator.pro27
-rw-r--r--src/pdf/quick/quick.pro2
-rw-r--r--src/pdfwidgets/pdfwidgets.pro1
-rw-r--r--src/plugins/imageformats/pdf/pdf.pro6
6 files changed, 42 insertions, 15 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)
diff --git a/src/pdfwidgets/pdfwidgets.pro b/src/pdfwidgets/pdfwidgets.pro
index cf221be03..17772b886 100644
--- a/src/pdfwidgets/pdfwidgets.pro
+++ b/src/pdfwidgets/pdfwidgets.pro
@@ -9,4 +9,5 @@ HEADERS += \
qpdfview_p.h \
qtpdfwidgetsglobal.h
+include($${OUT_PWD}/../pdf/$$getConfigDir()/QtPdf_static_dep.pri)
load(qt_module)
diff --git a/src/plugins/imageformats/pdf/pdf.pro b/src/plugins/imageformats/pdf/pdf.pro
index b820ae7d5..1a11b8ef2 100644
--- a/src/plugins/imageformats/pdf/pdf.pro
+++ b/src/plugins/imageformats/pdf/pdf.pro
@@ -1,11 +1,13 @@
TARGET = qpdf
-
PLUGIN_TYPE = imageformats
PLUGIN_EXTENDS = pdf
PLUGIN_CLASS_NAME = QPdfPlugin
-load(qt_plugin)
HEADERS += qpdfiohandler_p.h
SOURCES += main.cpp \
qpdfiohandler.cpp
QT += pdf
+
+include($${OUT_PWD}/../../../pdf/$$getConfigDir()/QtPdf_static_dep.pri)
+
+load(qt_plugin)