fix/optimize QT_PLUGIN_PATH construction in qtAddTargetEnv()
instead of adding all possible plugin paths (for which QMAKEMODULES wouldn't have been a reliable source anyway), only add the paths of plugins of the necessary types. this necessitates that we create qt_plugin_<foo>.pri files also in shared builds of qt when making a prefix build. we don't install them unless it's a static build, though. Change-Id: Ib56b009562a7131d4dc4dfc259b34ec6581b0f77 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
d6525a6c10
commit
020c54daaa
@ -253,11 +253,13 @@ defineTest(qtAddTargetEnv) {
|
||||
deps = $$replace($$2, -private$, _private)
|
||||
deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends")
|
||||
!isEmpty(deps) {
|
||||
ptypes =
|
||||
for(dep, deps) {
|
||||
isEmpty(3): \
|
||||
deppath += $$shell_path($$eval(QT.$${dep}.libs))
|
||||
else: \
|
||||
deppath += $$system_path($$eval(QT.$${dep}.libs))
|
||||
ptypes += $$eval(QT.$${dep}.plugin_types)
|
||||
}
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
deppath.name = PATH
|
||||
@ -277,14 +279,16 @@ defineTest(qtAddTargetEnv) {
|
||||
deppath.CONFIG = prepend
|
||||
|
||||
pluginpath.value =
|
||||
for(qmod, QMAKEMODULES) {
|
||||
qmod = $$section(qmod, /, 0, -3)/plugins
|
||||
exists($$qmod) {
|
||||
isEmpty(3): \
|
||||
pluginpath.value += $$shell_path($$qmod)
|
||||
else: \
|
||||
pluginpath.value += $$system_path($$qmod)
|
||||
}
|
||||
ppaths = $$[QT_INSTALL_PLUGINS/get]
|
||||
for(qplug, QT_PLUGINS): \
|
||||
contains(ptypes, QT_PLUGIN.$${qplug}.TYPE): \
|
||||
ppaths += $$eval(QT_PLUGIN.$${qplug}.PATH)
|
||||
ppaths = $$unique(ppaths)
|
||||
for(qplug, ppaths) {
|
||||
isEmpty(3): \
|
||||
pluginpath.value += $$shell_path($$qplug)
|
||||
else: \
|
||||
pluginpath.value += $$system_path($$qplug)
|
||||
}
|
||||
pluginpath.name = QT_PLUGIN_PATH
|
||||
|
||||
|
@ -24,7 +24,7 @@ tool_plugin {
|
||||
contains(QT_CONFIG, build_all):CONFIG += build_all
|
||||
}
|
||||
|
||||
CONFIG(static, static|shared) {
|
||||
CONFIG(static, static|shared)|prefix_build {
|
||||
isEmpty(MODULE): MODULE = $$basename(TARGET)
|
||||
|
||||
mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
|
||||
@ -66,9 +66,11 @@ CONFIG(static, static|shared) {
|
||||
cache(QT_PLUGINS, transient)
|
||||
}
|
||||
|
||||
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||
pritarget.files = $$MODULE_PRI
|
||||
INSTALLS += pritarget
|
||||
CONFIG(static, static|shared) {
|
||||
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||
pritarget.files = $$MODULE_PRI
|
||||
INSTALLS += pritarget
|
||||
}
|
||||
}
|
||||
|
||||
target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
||||
|
Loading…
x
Reference in New Issue
Block a user