Install 3rd party headers and meta for static builds

When doing static builds any project which uses same
libraries as qtbase 3rd party libraries will most likely
end up in broken binaries, since symbols will be
included twice. Moreover, libraries can have different
versions. Install 3rd party headers and meta data for:

 * qtlibpng
 * qtfreetype
 * qtharbuzz

Pick-to: 5.15
Task-number: QTBUG-87154
Change-Id: I243dff9a12a95af20dee414f55bb762b8d579c81
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Michal Klocek 2020-09-18 10:52:32 +02:00
parent 125113c909
commit 802e5a45ba
4 changed files with 35 additions and 2 deletions

View File

@ -89,4 +89,32 @@ TARGET = $$THE_TARGET
# In static builds of Qt, convenience libraries must be installed,
# as in this case they are not linked to the final library/plugin.
installed|if(!not_installed:qtConfig(static)): load(qt_installs)
installed|if(!not_installed:qtConfig(static)) {
!isEmpty(MODULE_EXT_HEADERS) {
headers.files = $${MODULE_EXT_HEADERS}
headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
INSTALLS += headers
} else {
!isEmpty(MODULE_EXT_HEADERS_DIR) {
headers.files = $$MODULE_EXT_HEADERS_DIR/*
headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
INSTALLS += headers
}
}
CONFIG += qt_install_module
rpl_header_base = $$MODULE_INCLUDEPATH
rpl_lib_base = $${MODULE_LIBS}
qqt_dir = \$\$\$\$[QT_INSTALL_HEADERS]
pri_header_replace.match = $$rpl_header_base
pri_header_replace.replace = $$qqt_dir/$$TARGET
pri_header_replace.CONFIG = path
pri_header_replace.filename = qt_ext_$${MODULE}.pri
qqt_dir = \$\$\$\$[QT_INSTALL_LIBS]
pri_lib_replace.match = $$rpl_lib_base
pri_lib_replace.replace = $$qqt_dir/$$prefix$${THE_TARGET}.$$suffix
pri_lib_replace.CONFIG = path
pri_lib_replace.filename = qt_ext_$${MODULE}.pri
QMAKE_INSTALL_REPLACE += pri_header_replace pri_lib_replace
load(qt_installs)
}

View File

@ -7,6 +7,7 @@ CONFIG += \
installed
MODULE_INCLUDEPATH += $$PWD/include
MODULE_EXT_HEADERS_DIR = $$PWD/include
load(qt_helper_lib)

View File

@ -7,7 +7,6 @@ CONFIG += \
MODULE_INCLUDEPATH += $$PWD/include/harfbuzz
load(qt_helper_lib)
# built-in shapers list configuration:
SHAPERS += opentype # HB's main shaper; enabling it should be enough most of the time
@ -176,9 +175,13 @@ contains(SHAPERS, opentype) {
$$PWD/src/hb-ot-var.h
}
MODULE_EXT_HEADERS = $$HEADERS
contains(SHAPERS, fallback)|isEmpty(SHAPERS) {
DEFINES += HAVE_FALLBACK
SOURCES += \
$$PWD/src/hb-fallback-shape.cc
}
load(qt_helper_lib)

View File

@ -7,6 +7,7 @@ CONFIG += \
installed
MODULE_INCLUDEPATH = $$PWD
MODULE_EXT_HEADERS = png.h pngconf.h
load(qt_helper_lib)