From a0e15b8e11cb126f6e218b200bc204ddcf2ecdc9 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 5 Oct 2026 14:00:24 -0700 Subject: [PATCH 1/2] [vcpkg.targets] Skip applocal when the installed bin directory does not exist AppLocalFromInstalled starts vcpkg.exe z-applocal after every link, to copy DLLs from installed\\[debug\]bin next to the binary. When that directory does not exist, there is nothing it could copy. This happens with the user-wide integration (vcpkg integrate install) in every C++ project that uses no vcpkg packages, including the compiler-identification and try_compile projects that CMake's Visual Studio generator builds. Add Exists() on that directory to the target's condition. Target conditions are evaluated when the target is about to run, so in manifest mode the directory created by VcpkgInstallManifestDependencies earlier in the same build is seen. --- scripts/buildsystems/msbuild/vcpkg.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index dbcf6148775a39..23732964635823 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -219,7 +219,8 @@ + Condition="'$(_ZVcpkgClassicOrManifest)' == 'true' and '$(VcpkgApplocalDeps)' == 'true' and '$(LinkSkippedExecution)' != 'true' and '@(Link)' != '' + and Exists('$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin')"> <_ZVcpkgApplocalInstalledBinDir>$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin From 0af0210a306ced5ee8248697cd639f32e6cccb8f Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 5 Oct 2026 22:48:42 -0700 Subject: [PATCH 2/2] [vcpkg.targets] Remove trailing whitespace Pre-existing, reported by the PR whitespace check when the file is edited. --- scripts/buildsystems/msbuild/vcpkg.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 23732964635823..32b1e9e91615f3 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -180,7 +180,7 @@ --> -