Skip to content

Commit ff8ef17

Browse files
committed
Propagate Visual Studio path into vcpkg.
By default vcpkg will pick whatever VS version it thinks is best, even when running from inside a VS session, and mixing different versions of the Clang toolchain seems to create weird issues.
1 parent e317aae commit ff8ef17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

msvc/vcpkg-deploy/vcpkg-deploy.vcxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
<GenerateDebugInformation>true</GenerateDebugInformation>
6464
</Link>
6565
<PreBuildEvent>
66-
<Command>cd "$(SolutionDir)"
66+
<Command>set VCPKG_VISUAL_STUDIO_PATH=$(VsInstallRoot)
67+
68+
cd "$(SolutionDir)"
6769
"$(ProjectDir)install_vcpkg_dependencies.bat" x64-windows-static-v143 "$(TargetDir)"</Command>
6870
</PreBuildEvent>
6971
</ItemDefinitionGroup>
@@ -83,6 +85,7 @@
8385
set REHEX_WINSDK_INCLUDES=$(WindowsSDK_IncludePath)
8486
set REHEX_WINSDK_LIBDIRS=$(UniversalCRT_LibraryPath_x86)$(WindowsSDK_LibraryPath_x86)
8587
set VCPKG_KEEP_ENV_VARS=REHEX_SOLUTION_DIR;REHEX_WINSDK_INCLUDES;REHEX_WINSDK_LIBDIRS
88+
set VCPKG_VISUAL_STUDIO_PATH=$(VsInstallRoot)
8689

8790
cd "$(SolutionDir)"
8891
"$(ProjectDir)install_vcpkg_dependencies.bat" x86-windows-static-enlyze "$(TargetDir)"

0 commit comments

Comments
 (0)