From 2c5416ae0793584f2baf456ee13182af1cd138b5 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Wed, 22 Mar 2023 15:54:22 -0700 Subject: [PATCH] Disable classic mode integration in standalone bundles. (#976) The difference between current vcpkg master and here is recorded as https://github.com/microsoft/vcpkg/pull/30373 --- vcpkg-init/mint-standalone-bundle.ps1 | 9 + vcpkg-init/vcpkg.props | 46 +++++ vcpkg-init/vcpkg.targets | 239 ++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 vcpkg-init/vcpkg.props create mode 100644 vcpkg-init/vcpkg.targets diff --git a/vcpkg-init/mint-standalone-bundle.ps1 b/vcpkg-init/mint-standalone-bundle.ps1 index bb48457d0f..195fe1e185 100644 --- a/vcpkg-init/mint-standalone-bundle.ps1 +++ b/vcpkg-init/mint-standalone-bundle.ps1 @@ -93,6 +93,15 @@ try { Copy-Item -Path "$SignedFilesRoot/addPoshVcpkgToPowershellProfile.ps1" -Destination 'out/scripts/addPoshVcpkgToPowershellProfile.ps1' New-Item -Path 'out/scripts/buildsystems/msbuild' -ItemType 'Directory' -Force Copy-Item -Path "$SignedFilesRoot/applocal.ps1" -Destination 'out/scripts/buildsystems/msbuild/applocal.ps1' + + # None of the standalone bundles support classic mode, so turn that off in the bundled copy of the props + $propsContent = Get-Content "$PSScriptRoot/vcpkg.props" -Raw -Encoding Ascii + $classicEnabledLine = "true" + $classicDisabledLine = "false" + $propsContent = $propsContent.Replace($classicEnabledLine, $classicDisabledLine) + Set-Content -Path "out/scripts/buildsystems/msbuild/vcpkg.props" -Value $propsContent -NoNewline -Encoding Ascii + + Copy-Item -Path "$PSScriptRoot/vcpkg.targets" -Destination 'out/scripts/buildsystems/msbuild/vcpkg.targets' New-Item -Path 'out/scripts/posh-vcpkg/0.0.1' -ItemType 'Directory' -Force Copy-Item -Path "$SignedFilesRoot/posh-vcpkg.psm1" -Destination 'out/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1' diff --git a/vcpkg-init/vcpkg.props b/vcpkg-init/vcpkg.props new file mode 100644 index 0000000000..0f0b6e3b35 --- /dev/null +++ b/vcpkg-init/vcpkg.props @@ -0,0 +1,46 @@ + + + + true + true + + + + + + + + $(Configuration) + + + + + Debug + + + + + Release + + + + + + false + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..')) + + true + + false + true + + + true + + + false + true + $([MSbuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), vcpkg.json)) + + diff --git a/vcpkg-init/vcpkg.targets b/vcpkg-init/vcpkg.targets new file mode 100644 index 0000000000..361850bd83 --- /dev/null +++ b/vcpkg-init/vcpkg.targets @@ -0,0 +1,239 @@ + + + + + + + + + <_ZVcpkgRoot>$(VcpkgRoot) + <_ZVcpkgManifestRoot>$(VcpkgManifestRoot) + <_ZVcpkgInstalledDir>$(VcpkgInstalledDir) + + + + + <_ZVcpkgRoot Condition="!$(_ZVcpkgRoot.EndsWith('\'))">$(_ZVcpkgRoot)\ + <_ZVcpkgManifestRoot Condition="'$(_ZVcpkgManifestRoot)' != '' and !$(_ZVcpkgManifestRoot.EndsWith('\'))">$(_ZVcpkgManifestRoot)\ + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' != '' and !$(_ZVcpkgInstalledDir.EndsWith('\'))">$(_ZVcpkgInstalledDir)\ + + + + <_ZVcpkgClassicOrManifest Condition="'$(VcpkgEnabled)' == 'true' And ('$(VcpkgEnableClassic)' == 'true' Or '$(VcpkgEnableManifest)' == 'true')">true + <_ZVcpkgClassicOrManifest Condition="'$(_ZVcpkgClassicOrManifest)' == ''">false + + + + + windows + x64 + true + + + xbox-scarlett + x64 + false + + + xbox-xboxone + x64 + false + + + + + windows + uwp + + + + $(Platform) + x86 + + + + <_ZVcpkgLinkage /> + <_ZVcpkgLinkage Condition="'$(VcpkgUseStatic)' == 'true'">-static + <_ZVcpkgLinkageMD /> + <_ZVcpkgLinkageMD Condition="'$(VcpkgUseStatic)' == 'true' and '$(VcpkgUseMD)' == 'true'">-md + $(VcpkgPlatformTarget)-$(VcpkgOSTarget)$(_ZVcpkgLinkage)$(_ZVcpkgLinkageMD) + $(VcpkgTriplet)$(_ZVcpkgLinkage)$(_ZVcpkgLinkageMD) + + + + + VcpkgTriplet=$(VcpkgTriplet):$(ProjectStateLine) + + + + + + + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgManifestRoot)vcpkg_installed\$(VcpkgTriplet)\ + + + + + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgRoot)installed\ + + + + + + <_ZVcpkgCurrentInstalledDir>$(_ZVcpkgInstalledDir)$(VcpkgTriplet)\ + <_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Debug'))">Debug + <_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Release')) or '$(VcpkgConfiguration)' == 'RelWithDebInfo' or '$(VcpkgConfiguration)' == 'MinSizeRel'">Release + + <_ZVcpkgConfigSubdir Condition="'$(_ZVcpkgNormalizedConfiguration)' == 'Debug'">debug\ + <_ZVcpkgExecutable>$(_ZVcpkgRoot)vcpkg.exe + $(ExternalIncludePath);$(_ZVcpkgCurrentInstalledDir)include + + + + + $(_ZVcpkgRoot)scripts\buildsystems\msbuild\vcpkg-general.xml + + + + + Project + + + + + + + %(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link + + + %(AdditionalDependencies);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\*.lib + %(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link + + + %(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include + + + %(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include + + + + + + + + + + + + + + + + + + + <_ZVcpkgHostTripletParameter>"--host-triplet=$(VcpkgHostTriplet)" + <_ZVcpkgHostTripletSuffix>$(VcpkgHostTriplet). + + + + + <_ZVcpkgHostTripletParameter /> + <_ZVcpkgHostTripletSuffix /> + + + + + + <_ZVcpkgManifestFileLocation>$(_ZVcpkgManifestRoot)vcpkg.json + <_ZVcpkgConfigurationFileLocation>$(_ZVcpkgManifestRoot)vcpkg-configuration.json + <_ZVcpkgMSBuildStampFile>$(_ZVcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)stamp + + + + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgManifestFileLocation)"/> + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgConfigurationFileLocation)" Condition="Exists('$(_ZVcpkgConfigurationFileLocation)')"/> + + + + + + <_ZVcpkgTLogFileLocation>$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)read.1u.tlog + + + + + + + + + + + + + + + + + <_ZVcpkgAppLocalPowerShellCommonArguments>-ExecutionPolicy Bypass -noprofile -File "$(MSBuildThisFileDirectory)applocal.ps1" "$(TargetPath)" "$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin" "$(TLogLocation)$(ProjectName).write.1u.tlog" "$(IntDir)vcpkg.applocal.log" + + + + + + + + + + + + + + + + + + + + +