set QT_PLUGIN_PATH for tools
Change-Id: Ie76b25b605ab4271eff161ee9bfc4f54df640f4a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
07e187a341
commit
43a36a682a
@ -32,9 +32,12 @@
|
|||||||
privqt = $$replace(QT_PRIVATE, -private$, )
|
privqt = $$replace(QT_PRIVATE, -private$, )
|
||||||
privdep = $$resolve_depends(privqt, "QT.")
|
privdep = $$resolve_depends(privqt, "QT.")
|
||||||
rpaths =
|
rpaths =
|
||||||
|
pluginpath =
|
||||||
alldep = $$pubdep $$privdep
|
alldep = $$pubdep $$privdep
|
||||||
for(dep, alldep): \ # Inherit link-rpaths from all our dependencies
|
for(dep, alldep) { # Inherit link-rpaths from all our dependencies
|
||||||
rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private)
|
rpaths += $$eval(QT.$${dep}.rpath_link) $$eval(QT.$${dep}.rpath_link_private)
|
||||||
|
pluginpath += $$eval(QT.$${dep}.plugin_path) $$eval(QT.$${dep}.plugins)
|
||||||
|
}
|
||||||
privdep -= $$pubdep
|
privdep -= $$pubdep
|
||||||
for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths
|
for(dep, privdep): \ # Add our private dependencies' lib paths as new link-rpaths
|
||||||
rpaths += $$eval(QT.$${dep}.libs)
|
rpaths += $$eval(QT.$${dep}.libs)
|
||||||
@ -55,6 +58,7 @@
|
|||||||
} else {
|
} else {
|
||||||
module_rpathlink_priv =
|
module_rpathlink_priv =
|
||||||
}
|
}
|
||||||
|
pluginpath = $$unique(pluginpath)
|
||||||
|
|
||||||
# Create a forwarding module .pri file
|
# Create a forwarding module .pri file
|
||||||
MODULE_FWD_PRI_CONT = \
|
MODULE_FWD_PRI_CONT = \
|
||||||
@ -67,6 +71,7 @@
|
|||||||
$$module_rpathlink \
|
$$module_rpathlink \
|
||||||
$$module_rpathlink_priv \
|
$$module_rpathlink_priv \
|
||||||
"QT.$${MODULE}.rpath = $$MODULE_INSTALL_LIBS" \
|
"QT.$${MODULE}.rpath = $$MODULE_INSTALL_LIBS" \
|
||||||
|
"QT.$${MODULE}.plugin_path = $$val_escape(pluginpath)" \
|
||||||
"include($$MODULE_PRI)"
|
"include($$MODULE_PRI)"
|
||||||
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
||||||
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
||||||
|
@ -38,12 +38,19 @@ INSTALLS += target
|
|||||||
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
|
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
|
||||||
deps = $$resolve_depends(QT, "QT.")
|
deps = $$resolve_depends(QT, "QT.")
|
||||||
!isEmpty(deps) {
|
!isEmpty(deps) {
|
||||||
|
plugin_paths =
|
||||||
for(dep, deps) {
|
for(dep, deps) {
|
||||||
deppath += $$shell_path($$eval(QT.$${dep}.libs))
|
deppath += $$shell_path($$eval(QT.$${dep}.libs))
|
||||||
for(rpath, QT.$${dep}.rpath_link): \
|
for(rpath, QT.$${dep}.rpath_link): \
|
||||||
deppath += $$shell_path($$rpath)
|
deppath += $$shell_path($$rpath)
|
||||||
|
plugin_paths += $$eval(QT.$${dep}.plugin_path) $$eval(QT.$${dep}.plugins)
|
||||||
}
|
}
|
||||||
deppath = $$unique(deppath)
|
deppath = $$unique(deppath)
|
||||||
|
plugin_paths = $$unique(plugin_paths)
|
||||||
|
pluginpath =
|
||||||
|
for(ppath, plugin_paths): \
|
||||||
|
exists($$ppath): \
|
||||||
|
pluginpath += $$shell_path($$ppath)
|
||||||
equals(QMAKE_DIR_SEP, /) {
|
equals(QMAKE_DIR_SEP, /) {
|
||||||
equals(QMAKE_HOST.os, Windows): \
|
equals(QMAKE_HOST.os, Windows): \
|
||||||
var = PATH
|
var = PATH
|
||||||
@ -53,10 +60,12 @@ INSTALLS += target
|
|||||||
var = DYLD_LIBRARY_PATH
|
var = DYLD_LIBRARY_PATH
|
||||||
else: \
|
else: \
|
||||||
error("Operating system not supported.")
|
error("Operating system not supported.")
|
||||||
cmd = "$$var=$$join(deppath, :)${$$var:+:\$$$var} $$cmd"
|
!isEmpty(pluginpath): pluginpath = "QT_PLUGIN_PATH=$$join(pluginpath, :) "
|
||||||
|
cmd = "$$var=$$join(deppath, :)${$$var:+:\$$$var} $$pluginpath$$cmd"
|
||||||
} else {
|
} else {
|
||||||
|
!isEmpty(pluginpath): pluginpath = "(set QT_PLUGIN_PATH=$$join(pluginpath, ;)) & "
|
||||||
# Escape closing parens when expanding %PATH%, otherwise cmd confuses itself.
|
# Escape closing parens when expanding %PATH%, otherwise cmd confuses itself.
|
||||||
cmd = "(set PATH=$$join(deppath, ;);%PATH:)=^)%) & $$cmd"
|
cmd = "(set PATH=$$join(deppath, ;);%PATH:)=^)%) & $$pluginpath$$cmd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user