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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <Authors>Microsoft Research</Authors>
    <Company>Microsoft Corporation</Company>
    <Description>.NET wrapper examples for Microsoft SEAL</Description>
    <Copyright>Microsoft Corporation 2022</Copyright>
  </PropertyGroup>

  <PropertyGroup>
    <PlatformTarget>x64</PlatformTarget>
    <OutputPath>@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/dotnet/$(Configuration)</OutputPath>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="$(ProjectDir)../src/SEALNet.csproj" />
  </ItemGroup>

  <ItemGroup>
    <SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="@SEAL_WINDOWS_SEAL_C_DIRECTORY@\sealc.dll" />
    <SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc.so*" />
    <SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc*.dylib" />
  </ItemGroup>

  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Copy SourceFiles="@(SEALCBinaryFiles)" DestinationFolder="$(TargetDir)" />
  </Target>

  <ItemGroup>
    <Compile Include="@CMAKE_CURRENT_SOURCE_DIR@\dotnet\examples\**\*.cs" />
  </ItemGroup>
</Project>
