dotnet-installer/src/finalizer_shim/finalizer_shim.csproj
2021-09-23 08:57:00 -07:00

35 lines
1.6 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!--
This is a shim project to restore the WiX library and copy out the *.lib and *.h files so
we can build the finalizer.
-->
<PropertyGroup>
<Platform Condition="'$(Platform)' == 'AnyCPU' Or '$(Platform)' == ''">$(Architecture)</Platform>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Signed.Wix" Version="$(WixPackageVersion)" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<NativeProjectReference Include="$(RepoRoot)src\finalizer\CMakeLists.txt" CMakeProject="$(RepoRoot)src\finalizer\finalizer.proj" BuildNative="true"/>
</ItemGroup>
<!-- This target needs to run before the native project reference is built. -->
<Target Name="CopySdk" AfterTargets="Restore" BeforeTargets="Build">
<ItemGroup>
<WixLib Include="$(WixSdkPath)vs2017\lib\**\*.*" />
<WixInclude Include="$(WixSdkPath)inc\**\*.*" />
</ItemGroup>
<!-- Copy all the lib files for x86, x64, and arm64 -->
<Copy SourceFiles="@(WixLib)" DestinationFiles="@(WixLib->'$(ArtifactsDir)WixSdk\lib\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(WixInclude)" DestinationFolder="$(ArtifactsDir)WixSdk\inc" SkipUnchangedFiles="true" />
</Target>
<Import Project="ProjectReference.targets" Sdk="Microsoft.DotNet.CMake.Sdk" />
</Project>