Skip to content
Snippets Groups Projects
Commit 88ffd777 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Add absolute paths to environment.

Change-Id: I0f23f8d372f3ceb3d4af301196e6fdea5f969998
Reviewed-on: http://codereview.qt.nokia.com/2819


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent ab3c2563
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
#include <QtGui/QCheckBox> #include <QtGui/QCheckBox>
#include <QtGui/QToolButton> #include <QtGui/QToolButton>
#include <QtGui/QComboBox> #include <QtGui/QComboBox>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
using namespace Qt4ProjectManager::Internal; using namespace Qt4ProjectManager::Internal;
using namespace Qt4ProjectManager; using namespace Qt4ProjectManager;
...@@ -607,9 +609,19 @@ Utils::Environment Qt4RunConfiguration::baseEnvironment() const ...@@ -607,9 +609,19 @@ Utils::Environment Qt4RunConfiguration::baseEnvironment() const
// to find those libraries while actually running we explicitly prepend those // to find those libraries while actually running we explicitly prepend those
// dirs to the library search path // dirs to the library search path
const Qt4ProFileNode *node = qt4Target()->qt4Project()->rootProjectNode()->findProFileFor(m_proFilePath); const Qt4ProFileNode *node = qt4Target()->qt4Project()->rootProjectNode()->findProFileFor(m_proFilePath);
if (node) if (node) {
foreach(const QString &dir, node->variableValue(LibDirectoriesVar)) const QStringList libDirectories = node->variableValue(LibDirectoriesVar);
env.prependOrSetLibrarySearchPath(dir); if (!libDirectories.isEmpty()) {
const QString proDirectory = QFileInfo(node->path()).absolutePath();
foreach (QString dir, libDirectories) {
// Fix up relative entries like "LIBS+=-L.."
const QFileInfo fi(dir);
if (!fi.isAbsolute())
dir = QDir::cleanPath(proDirectory + QLatin1Char('/') + dir);
env.prependOrSetLibrarySearchPath(dir);
} // foreach
} // libDirectories
} // node
return env; return env;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment