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

  <PropertyGroup>
    <IsPackable>false</IsPackable>
    <IsPackable Condition="'$([MSBuild]::IsOSPlatform(OSX))' == 'True'">true</IsPackable>
    <TargetFramework>netstandard2.0</TargetFramework>
    <CastXmlPath Condition="Exists('/usr/bin/castxml')">/usr/bin/castxml</CastXmlPath>
    <CastXmlPath Condition="Exists('/usr/local/bin/castxml')">/usr/local/bin/castxml</CastXmlPath>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <!-- This is needed because Rider doesn't see generated files in obj for some reason -->
    <SharpGenGeneratedCodeFolder>$(MSBuildThisFileDirectory)/Generated</SharpGenGeneratedCodeFolder>
  </PropertyGroup>

  <ItemGroup Condition="'$(Configuration)' == 'Release' AND '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">
    <Content Include="../../Build/Products/Release/libAvalonia.Native.OSX.dylib">
      <PackagePath>runtimes/osx/native/libAvaloniaNative.dylib</PackagePath>
      <Pack>true</Pack>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  
  <ItemGroup>
    <SharpGenMapping Include="Mappings.xml" />
    <PackageReference Include="SharpGenTools.Sdk" Version="1.1.2" PrivateAssets="all" />
    <PackageReference Include="SharpGen.Runtime.COM" Version="1.1.0" />
    <ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" />
  </ItemGroup>
</Project>
