<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <PackAvaloniaNative Condition="'$(PackAvaloniaNative)' == ''">$([MSBuild]::IsOSPlatform(OSX))</PackAvaloniaNative>
    <IsPackable>$(PackAvaloniaNative)</IsPackable>
    <IsPackable Condition="'$([MSBuild]::IsOSPlatform(OSX))' == 'True'">true</IsPackable>
    <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <MicroComGeneratorRuntimeNamespace>Avalonia.MicroCom</MicroComGeneratorRuntimeNamespace>
  </PropertyGroup>

  <ItemGroup Condition="'$(PackAvaloniaNative)' == 'true'">
    <Content Include="../../Build/Products/Release/libAvalonia.Native.OSX.dylib">
      <Link>libAvaloniaNative.dylib</Link>
      <PackagePath>runtimes/osx/native/libAvaloniaNative.dylib</PackagePath>
      <Pack>true</Pack>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\Avalonia.Base\Metadata\NullableAttributes.cs" Link="NullableAttributes.cs" />
  </ItemGroup>
  
  <ItemGroup>
    <ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" />
    <ProjectReference Include="..\Avalonia.Dialogs\Avalonia.Dialogs.csproj" />
    <PackageReference Include="MicroCom.CodeGenerator.MSBuild" Version="0.10.4" PrivateAssets="all" />
    <MicroComIdl Include="avn.idl" CSharpInteropPath="Interop.Generated.cs" />
  </ItemGroup>
</Project>
