forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user