diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-08-13 17:01:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-15 09:19:09 +0200 |
commit | 43a36a682a1443da4fded74864495969a041dfbb (patch) | |
tree | ae44085de73c896daf09baa672b3733f648108d0 /mkspecs/features/qt_tool.prf | |
parent | 07e187a3418b1ee6386f9cdee8c14ba0d01636f7 (diff) |
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>
Diffstat (limited to 'mkspecs/features/qt_tool.prf')
-rw-r--r-- | mkspecs/features/qt_tool.prf | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index a43a1041b1..055cf1af71 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -38,12 +38,19 @@ INSTALLS += target cmd = $$shell_path($$QMAKE_RESOLVED_TARGET) deps = $$resolve_depends(QT, "QT.") !isEmpty(deps) { + plugin_paths = for(dep, deps) { deppath += $$shell_path($$eval(QT.$${dep}.libs)) for(rpath, QT.$${dep}.rpath_link): \ deppath += $$shell_path($$rpath) + plugin_paths += $$eval(QT.$${dep}.plugin_path) $$eval(QT.$${dep}.plugins) } 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_HOST.os, Windows): \ var = PATH @@ -53,10 +60,12 @@ INSTALLS += target var = DYLD_LIBRARY_PATH else: \ 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 { + !isEmpty(pluginpath): pluginpath = "(set QT_PLUGIN_PATH=$$join(pluginpath, ;)) & " # 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" } } |