🚨🚨 THIS PROJECT IS NOT MAINTAINED ANYMORE, DO NOT USE IT 🚨🚨
vcpkg wrapped in nuget-y goodness 📦
I needed a project local (not system wide) way to easily consume vcpkg that worked with no dependencies. This project aims to be that solution, distributed via nuget.
Note: This only supports vcpkg running as part of msbuild, and therefore requires windows.
See vcpkg.nuget-example for an example! ✨
This package relies on VcpkgPackage
msbuild tasks, that leverage the following format:
<VcpkgPackage Include="packageName"/>
Where packageName
refers to the vcpkg port you wish to install.
By default the task invoking vcpkg has a generous default timeout of ten minutes. If your package builds run longer than that, override the VcpkgTaskTimeout
property with a higher value:
<PropertyGroup>
<!-- task may run for up to twenty minutes -->
<VcpkgTaskTimeout>1200000</VcpkgTaskTimeout>
</PropertyGroup>
- Install the nuget package
- Find the relevant ports you wish to install here
- Add
VcpkgPackage
elements to your project file - Building will ensure ports are built and installed
- Install the nuget package
- Import our build configuration in your project file:
<Import Project="packages\Vcpkg.Nuget.1.0.0-beta\build\Vcpkg.Nuget.props" Condition="Exists('packages\Vcpkg.Nuget.1.0.0-beta\build\Vcpkg.Nuget.props')" />
- Find the relevant ports you wish to install here
- Add
VcpkgPackage
elements to your project file - Building will ensure ports are built and installed
Note: This approach is documented in the vcpkg docs as well. We're duplicating that info here as it's common scenario for folks consuming this library.
To override the automatically chosen triplet, you can specify the MSBuild property VcpkgTriplet
in your .vcxproj
. We recommend adding this to the Globals
PropertyGroup.
<PropertyGroup Label="Globals">
<!-- .... -->
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
</PropertyGroup>
CI Builds and Release managements takes place in a private VSTS instance. If you feel you need access (if you're a core contributor) please open an issue against @bengreenier.
- Be nice and open to feedback.
Unless this project gets more traction, this is the only requirement to contribute.
MIT