<Project Sdk="Microsoft.NET.Sdk">
  <Import Project="..\MSBuild\Robust.Engine.props" />
  <PropertyGroup>
    <IsPackable>false</IsPackable>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <OutputType>WinExe</OutputType>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <NoWarn>NU1701;CA1416</NoWarn>
    <OutputPath>../bin/Client</OutputPath>
    <RobustILLink>true</RobustILLink>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="DiscordRichPresence" PrivateAssets="compile" />
    <PackageReference Include="JetBrains.Annotations" PrivateAssets="All" />
    <PackageReference Include="Microsoft.Data.Sqlite.Core" PrivateAssets="compile" />
    <PackageReference Include="SQLitePCLRaw.provider.sqlite3" Condition="'$(UseSystemSqlite)' == 'True'" PrivateAssets="compile" />
    <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Condition="'$(UseSystemSqlite)' != 'True'" PrivateAssets="compile" />
    <PackageReference Include="SpaceWizards.NFluidsynth" PrivateAssets="compile" />
    <PackageReference Include="SixLabors.ImageSharp" />
    <PackageReference Include="OpenToolkit.Graphics" PrivateAssets="compile" />
    <PackageReference Include="OpenTK.Audio.OpenAL" PrivateAssets="compile" />
    <PackageReference Include="SpaceWizards.SharpFont" PrivateAssets="compile" />
    <PackageReference Include="SpaceWizards.Sdl" PrivateAssets="compile" />
    <PackageReference Include="Robust.Natives" />
    <PackageReference Include="TerraFX.Interop.Windows" PrivateAssets="compile" />
    <PackageReference Condition="'$(RobustToolsBuild)' == 'True'" Include="JetBrains.Profiler.Api" PrivateAssets="compile" />
    <PackageReference Include="SpaceWizards.Sodium" PrivateAssets="compile" />
    <PackageReference Include="Microsoft.NET.ILLink.Tasks" />
    <PackageReference Include="TerraFX.Interop.Xlib" />
    <PackageReference Include="YamlDotNet" />
    <PackageReference Include="Microsoft.Extensions.ObjectPool" />
    <PackageReference Include="prometheus-net" />
    <PackageReference Include="Serilog" />

    <!-- Needed to pin transitive dependency versions. -->
    <PackageReference Include="System.Text.Json" />
    <PackageReference Include="Newtonsoft.Json" />
  </ItemGroup>
  <ItemGroup Condition="'$(EnableClientScripting)' == 'True'">
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" PrivateAssets="compile" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" PrivateAssets="compile" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="compile" />

    <ProjectReference Include="..\Robust.Shared.Scripting\Robust.Shared.Scripting.csproj" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />
    <ProjectReference Include="..\Lidgren.Network\Lidgren.Network.csproj" />
    <ProjectReference Include="..\NetSerializer\NetSerializer\NetSerializer.csproj" />
    <ProjectReference Include="..\Robust.LoaderApi\Robust.LoaderApi\Robust.LoaderApi.csproj" />
    <ProjectReference Include="..\Robust.Shared.Maths\Robust.Shared.Maths.csproj" />
    <ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(RobustToolsBuild)' == 'True'">
    <ProjectReference Include="..\Robust.Xaml\Robust.Xaml.csproj" />
  </ItemGroup>

  <!-- Shader embedding -->
  <ItemGroup>
    <EmbeddedResource Include="Graphics\Clyde\Shaders\*" />
  </ItemGroup>

  <!-- ILLink configuration -->
  <ItemGroup>
    <RobustLinkRoots Include="Robust.Client" />
    <RobustLinkRoots Include="Robust.Shared" />
    <RobustLinkAssemblies Include="TerraFX.Interop.Windows" />
    <RobustLinkAssemblies Include="TerraFX.Interop.Xlib" />
    <RobustLinkAssemblies Include="OpenToolkit.Graphics" />
    <RobustLinkAssemblies Include="SpaceWizards.Sdl" />
    <RobustLinkAssemblies Include="SpaceWizards.SharpFont" />
  </ItemGroup>

  <Import Project="..\MSBuild\Robust.Properties.targets" />

  <ItemGroup Condition="'$(IsFreedesktop)' == 'True'">
    <PackageReference Include="SpaceWizards.Fontconfig.Interop" />
    <RobustLinkAssemblies Include="SpaceWizards.Fontconfig.Interop" />
  </ItemGroup>

  <Import Project="..\MSBuild\XamlIL.targets" />

  <Import Project="..\MSBuild\Robust.Trimming.targets" />
</Project>
