mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[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:
parent
5d6bbf3da3
commit
d97c3ab76c
@ -3,7 +3,29 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VcpkgPropsImported>true</VcpkgPropsImported>
|
<VcpkgPropsImported>true</VcpkgPropsImported>
|
||||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
<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>
|
<VcpkgUseStatic Condition="'$(VcpkgUseStatic)' == ''">false</VcpkgUseStatic>
|
||||||
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..'))</VcpkgRoot>
|
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..'))</VcpkgRoot>
|
||||||
|
|
||||||
|
@ -109,6 +109,8 @@
|
|||||||
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile">
|
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile">
|
||||||
<Message Text="Using triplet "$(VcpkgTriplet)" from "$(_ZVcpkgCurrentInstalledDir)""
|
<Message Text="Using triplet "$(VcpkgTriplet)" from "$(_ZVcpkgCurrentInstalledDir)""
|
||||||
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
|
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)""
|
<Message Text="Not using Vcpkg because VcpkgEnabled is "$(VcpkgEnabled)""
|
||||||
Importance="Normal" Condition="'$(VcpkgEnabled)' != 'true'"/>
|
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)')."
|
<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)')."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user