Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core feature request: automatically bootstrap when using msbuild via directory.build.props/targets #42839

Open
fredemmott opened this issue Dec 21, 2024 · 0 comments

Comments

@fredemmott
Copy link

I usually use vcpkg with CMake, but also use it in a few msbuild projects; I came across https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/msbuild-integration - thanks for adding support for app-local mode/vcpkg-as-a-submodule in msbuild!

I was surprised that - unlike the CMAKE_TOOLCHAIN_FILE approach - vcpkg is not automatically bootstrapped by the msbuild props/targets files. It would be nice for consistency if the msbuild integration did this too.

I'm currently doing this with a custom PreBuildEvent:

<Project>
 <Import Project="$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.targets" />
 <ItemDefinitionGroup Condition="!Exists('$(MSBuildThisFileDirectory)/vcpkg/vcpkg.exe')">
   <PreBuildEvent>
     <Command>$(MSBuildThisFileDirectory)vcpkg\bootstrap-vcpkg.bat</Command>
     <Message>Bootstrap vcpkg</Message>
   </PreBuildEvent>
 </ItemDefinitionGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant