зеркало из https://github.com/microsoft/vcpkg.git
[vcpkg-msbuild-integration] Set the default value of `VcpkgConfiguration` according to `$(UseDebugLibraries)` rather than `$(Configuration)` for better support of custom configuration names. (#26177)
Competing resolution of https://github.com/microsoft/vcpkg/pull/9496 and https://github.com/microsoft/vcpkg/pull/22086
This commit is contained in:
Родитель
5d6bbf3da3
Коммит
d97c3ab76c
|
@ -3,7 +3,29 @@
|
|||
<PropertyGroup>
|
||||
<VcpkgPropsImported>true</VcpkgPropsImported>
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgConfiguration Condition="'$(VcpkgConfiguration)' == ''">$(Configuration)</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set the default value of $(VcpkgConfiguration) according to $(UseDebugLibraries) and $(Configuration) -->
|
||||
<Choose>
|
||||
<When Condition="'$(VcpkgConfiguration)' != ''" />
|
||||
<When Condition="'$(UseDebugLibraries)' == ''">
|
||||
<PropertyGroup>
|
||||
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="'$(UseDebugLibraries)' == 'true'">
|
||||
<PropertyGroup>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<VcpkgConfiguration>Release</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup>
|
||||
<VcpkgUseStatic Condition="'$(VcpkgUseStatic)' == ''">false</VcpkgUseStatic>
|
||||
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..'))</VcpkgRoot>
|
||||
|
||||
|
|
|
@ -109,6 +109,8 @@
|
|||
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile">
|
||||
<Message Text="Using triplet "$(VcpkgTriplet)" from "$(_ZVcpkgCurrentInstalledDir)""
|
||||
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
|
||||
<Message Text="Using normalized configuration "$(_ZVcpkgNormalizedConfiguration)""
|
||||
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
|
||||
<Message Text="Not using Vcpkg because VcpkgEnabled is "$(VcpkgEnabled)""
|
||||
Importance="Normal" Condition="'$(VcpkgEnabled)' != 'true'"/>
|
||||
<Message Text="Vcpkg is unable to link because we cannot decide between Release and Debug libraries. Please define the property VcpkgConfiguration to be 'Release' or 'Debug' (currently '$(VcpkgConfiguration)')."
|
||||
|
|
Загрузка…
Ссылка в новой задаче