forked from qt-creator/qt-creator
CMakePM: Only add external "bin" dirs to PATH
At QTCREATORBUG-29662 we have the issue when a program cannot be started because the PATH environment variable had content longer than 2048 characters. Qt Creator 12 had only one place that added paths to librarySeachPaths namely the "bin" directories. Qt Creator 13 tried to filter these "bin" directories to the ones that have .dll files. This fixed QTCREATORBUG-29662 but had issues with dlls having different names than the link libraries provided by CMake. By only allowing "bin" directories from paths not from the build directory we allow Qt, or OpenSSL dependencies, but not just existing "bin" directories. Amends0d8a542b4f
Amends8713919f31
Amendsac97ab1abf
Amends2ce6255a7d
Task-number: QTCREATORBUG-29662 Change-Id: If0b162f25ae1e5bfc1e1ff313720c54c5ae936c5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -336,7 +336,7 @@ static CMakeBuildTarget toBuildTarget(const TargetDetails &t,
|
|||||||
// actual dll files in ../bin on windows. Qt is one example of that.
|
// actual dll files in ../bin on windows. Qt is one example of that.
|
||||||
if (tmp.fileName() == "lib") {
|
if (tmp.fileName() == "lib") {
|
||||||
const FilePath path = tmp.parentDir().pathAppended("bin");
|
const FilePath path = tmp.parentDir().pathAppended("bin");
|
||||||
if (path.isDir())
|
if (path.isDir() && !isChildOf(path, {buildDir}))
|
||||||
librarySeachPaths.append(path);
|
librarySeachPaths.append(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user