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

    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <Nullable>disable</Nullable>
        <LangVersion>9</LangVersion>
        <RootNamespace>ET</RootNamespace>
        <AssemblyName>ThirdParty</AssemblyName>
    </PropertyGroup>
    
    <PropertyGroup>
        <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
        <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
    </PropertyGroup>
    
    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
      <DefineConstants>DOTNET;UNITY_DOTSPLAYER</DefineConstants>
      <OutputPath>..\..\Bin\</OutputPath>
      <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
      <Optimize>true</Optimize>
    </PropertyGroup>
    
    <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
      <DefineConstants>DOTNET;UNITY_DOTSPLAYER</DefineConstants>
      <OutputPath>..\..\Bin\</OutputPath>
      <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    </PropertyGroup>

    <ItemGroup>

    <Compile Include="..\..\Unity\Assets\Scripts\ThirdParty\ETTask\**\*.cs">
        <Link>ETTask/%(RecursiveDir)%(FileName)%(Extension)</Link>
    </Compile>

    <Compile Include="..\..\Unity\Assets\Scripts\ThirdParty\Kcp\Kcp.cs">
      <Link>Kcp\Kcp.cs</Link>
    </Compile>

    <Compile Include="..\..\Unity\Assets\Scripts\ThirdParty\Recast\Recast.cs">
      <Link>Recast\Recast.cs</Link>
    </Compile>

    <Compile Include="..\..\Unity\Library\PackageCache\com.unity.mathematics*\Unity.Mathematics\**\*.cs">
        <Link>Unity.Mathematics/$([System.String]::new(%(RecursiveDir)).Substring($([System.String]::new(%(RecursiveDir)).Indexof("Unity.Mathematics"))).Replace("Unity.Mathematics", ""))/%(FileName)%(Extension)</Link>
    </Compile>
    </ItemGroup>

    <ItemGroup>
      <Content Include="..\..\Unity\Assets\Plugins\MacOS\x86_64\libkcp.dylib">
        <Link>Runtimes\MacOS\libkcp.dylib</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="..\..\Unity\Assets\Plugins\MacOS\x86_64\libRecastDll.dylib">
        <Link>Runtimes\MacOS\libRecastDll.dylib</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="..\..\Unity\Assets\Plugins\x86_64\kcp.dll">
        <Link>Runtimes\X86_64\kcp.dll</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="..\..\Unity\Assets\Plugins\x86_64\libkcp.so">
        <Link>Runtimes\Linux\libkcp.so</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="..\..\Unity\Assets\Plugins\x86_64\libRecastDll.so">
        <Link>Runtimes\Linux\libRecastDll.so</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="..\..\Unity\Assets\Plugins\x86_64\RecastDll.dll">
        <Link>Runtimes\X86_64\RecastDll.dll</Link>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
    </ItemGroup>

    <ItemGroup>
      <PackageReference Include="CommandLineParser" Version="2.8.0" />
      <PackageReference Include="EPPlus" Version="5.8.8" />
      <PackageReference Include="MongoDB.Driver" Version="2.17.1" />
      <PackageReference Include="NLog" Version="4.7.15" />
      <PackageReference Include="protobuf-net" Version="2.4.6" />
      <PackageReference Include="SharpZipLib" Version="1.3.3" />
      <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.0.1" />
      <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
    </ItemGroup>

</Project>