From 5d159e6185a9973ceff2dd91a78302f48b6be715 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 3 Jun 2024 13:04:01 +0200 Subject: [PATCH] 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. Amends 0d8a542b4f7d8a7b4d27f42ff16d309fba6cbf22 Amends 8713919f31f2aecc7e7c15f1fc9ce7906b8fefa0 Amends ac97ab1abf9bf073088925755a46f08f38721090 Amends 2ce6255a7d4fd33e54139a9615b3037e83587887 Task-number: QTCREATORBUG-29662 Change-Id: If0b162f25ae1e5bfc1e1ff313720c54c5ae936c5 Reviewed-by: Alessandro Portale --- src/plugins/cmakeprojectmanager/fileapidataextractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp index 66748345ced..9d55e2e692b 100644 --- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp +++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp @@ -336,7 +336,7 @@ static CMakeBuildTarget toBuildTarget(const TargetDetails &t, // actual dll files in ../bin on windows. Qt is one example of that. if (tmp.fileName() == "lib") { const FilePath path = tmp.parentDir().pathAppended("bin"); - if (path.isDir()) + if (path.isDir() && !isChildOf(path, {buildDir})) librarySeachPaths.append(path); } }