mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 16:43:02 +08:00
Add detailed instructions for custom configurations (#8258)
Resolves #2346
This commit is contained in:
parent
44de09ff5e
commit
5d90c36ad5
@ -52,11 +52,12 @@ Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurat
|
||||
|
||||
First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly.
|
||||
|
||||
For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration.
|
||||
For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. Unfortunately, due to the sequential nature of MSBuild, you'll need to add those settings much higher in your vcxproj so that it is declared before the Vcpk integration is loaded. It is recommend that the `$(VcpkgConfiguration)` macro is added to the "Globals" PropertyGroup.
|
||||
|
||||
For example, you can add support for your "MyRelease" configuration by adding in your project file:
|
||||
```
|
||||
<PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
...
|
||||
<VcpkgConfiguration Condition="'$(Configuration)' == 'MyRelease'">Release</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user