mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
[vcpkg-msbuild] Add a switch to disable classic mode for one-liner and in-VS installs. (#30373)
This commit is contained in:
parent
f810432626
commit
1174c9ea1d
@ -35,6 +35,9 @@
|
||||
<VcpkgAutoLink Condition="'$(UseLldLink)' == 'true'">false</VcpkgAutoLink>
|
||||
<VcpkgApplocalDeps Condition="'$(VcpkgApplocalDeps)' == ''">true</VcpkgApplocalDeps>
|
||||
|
||||
<!-- Classic Mode: The following line is edited by the mint standalone bundle script to be false for standlone copies -->
|
||||
<VcpkgEnableClassic Condition="'$(VcpkgEnableClassic)' == ''">true</VcpkgEnableClassic>
|
||||
|
||||
<!-- Manifest files -->
|
||||
<VcpkgEnableManifest Condition="'$(VcpkgEnableManifest)' == ''">false</VcpkgEnableManifest>
|
||||
<VcpkgManifestInstall Condition="'$(VcpkgManifestInstall)' == ''">true</VcpkgManifestInstall>
|
||||
|
@ -24,6 +24,11 @@
|
||||
<_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' != '' and !$(_ZVcpkgInstalledDir.EndsWith('\'))">$(_ZVcpkgInstalledDir)\</_ZVcpkgInstalledDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<_ZVcpkgClassicOrManifest Condition="'$(VcpkgEnabled)' == 'true' And ('$(VcpkgEnableClassic)' == 'true' Or '$(VcpkgEnableManifest)' == 'true')">true</_ZVcpkgClassicOrManifest>
|
||||
<_ZVcpkgClassicOrManifest Condition="'$(_ZVcpkgClassicOrManifest)' == ''">false</_ZVcpkgClassicOrManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Special-case custom MSBuild platforms defined in the Microsoft GDK. See https://aka.ms/gdk and https://aka.ms/gdkx -->
|
||||
<PropertyGroup Condition="'$(VcpkgOSTarget)' == '' AND '$(VcpkgPlatformTarget)' == '' AND '$(Platform)'=='Gaming.Desktop.x64'">
|
||||
<VcpkgOSTarget>windows</VcpkgOSTarget>
|
||||
@ -88,7 +93,7 @@
|
||||
|
||||
<_ZVcpkgConfigSubdir Condition="'$(_ZVcpkgNormalizedConfiguration)' == 'Debug'">debug\</_ZVcpkgConfigSubdir>
|
||||
<_ZVcpkgExecutable>$(_ZVcpkgRoot)vcpkg.exe</_ZVcpkgExecutable>
|
||||
<ExternalIncludePath Condition="'$(VcpkgEnabled)' == 'true'">$(ExternalIncludePath);$(_ZVcpkgCurrentInstalledDir)include</ExternalIncludePath>
|
||||
<ExternalIncludePath Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">$(ExternalIncludePath);$(_ZVcpkgCurrentInstalledDir)include</ExternalIncludePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@ -103,7 +108,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Install settings to get headers and import libs for the currently selected _ZVcpkgCurrentInstalledDir -->
|
||||
<ItemDefinitionGroup Condition="'$(VcpkgEnabled)' == 'true'">
|
||||
<ItemDefinitionGroup Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
@ -126,7 +131,7 @@
|
||||
Importance="High" Condition="'$(VcpkgEnableManifest)' != 'true' and '$(_ZVcpkgManifestRoot)' != ''" />
|
||||
</Target>
|
||||
|
||||
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile">
|
||||
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile" Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">
|
||||
<Message Text="Using triplet "$(VcpkgTriplet)" from "$(_ZVcpkgCurrentInstalledDir)""
|
||||
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
|
||||
<Message Text="Using normalized configuration "$(_ZVcpkgNormalizedConfiguration)""
|
||||
@ -158,7 +163,7 @@
|
||||
<_ZVcpkgMSBuildStampFile>$(_ZVcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)stamp</_ZVcpkgMSBuildStampFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(VcpkgEnabled)' == 'true'">
|
||||
<ItemGroup Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgEnableManifest)' == 'true' and '$(VcpkgManifestInstall)' == 'true'">
|
||||
<_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgManifestFileLocation)"/>
|
||||
<_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgConfigurationFileLocation)" Condition="Exists('$(_ZVcpkgConfigurationFileLocation)')"/>
|
||||
</ItemGroup>
|
||||
@ -191,7 +196,7 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup;RegisterOutput"
|
||||
Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgApplocalDeps)' == 'true' and '$(LinkSkippedExecution)' != 'true'">
|
||||
Condition="'$(_ZVcpkgClassicOrManifest)' == 'true' and '$(VcpkgApplocalDeps)' == 'true' and '$(LinkSkippedExecution)' != 'true'">
|
||||
<Message Text="[vcpkg] Starting VcpkgApplocalDeps" Importance="low" />
|
||||
<PropertyGroup>
|
||||
<_ZVcpkgAppLocalPowerShellCommonArguments>-ExecutionPolicy Bypass -noprofile -File "$(MSBuildThisFileDirectory)applocal.ps1" "$(TargetPath)" "$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin" "$(TLogLocation)$(ProjectName).write.1u.tlog" "$(IntDir)vcpkg.applocal.log"</_ZVcpkgAppLocalPowerShellCommonArguments>
|
||||
|
Loading…
x
Reference in New Issue
Block a user