Add LIBS-paths to PATH before running on windows.

On windows when linking to a library via -L/some/path, the library is
found in /some/path while linking. But running that app fails, since it
can't find the library. We now adjust PATH to include all paths from
LIBS and thus the library is found.
This commit is contained in:
dt
2010-03-29 15:17:04 +02:00
parent 58497e46a6
commit a67e88993b
3 changed files with 25 additions and 1 deletions

View File

@@ -1177,6 +1177,7 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
m_projectDir,
QStringList() << m_projectDir,
0);
newVarValues[LibDirectoriesVar] = libDirectories(m_readerExact);
if (m_varValues != newVarValues) {
m_varValues = newVarValues;
@@ -1355,6 +1356,17 @@ QStringList Qt4ProFileNode::includePaths(ProFileReader *reader) const
return paths;
}
QStringList Qt4ProFileNode::libDirectories(ProFileReader *reader) const
{
QStringList result;
foreach (const QString &str, reader->values(QLatin1String("LIBS"))) {
if (str.startsWith("-L")) {
result.append(str.mid(2));
}
}
return result;
}
QStringList Qt4ProFileNode::subDirsPaths(ProFileReader *reader) const
{
QStringList subProjectPaths;