<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net8.0;net472</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <Platforms>x86;x64;arm64;AnyCPU</Platforms>
    <Configurations>DebugQ8;DebugQ16;DebugQ16-HDRI;TestQ8;TestQ16;TestQ16-HDRI;TestQ8-OpenMP;TestQ16-OpenMP;TestQ16-HDRI-OpenMP</Configurations>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q8'))">
    <DefineConstants>Q8;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q8</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q8-OpenMP'))">
    <DefineConstants>Q8;OPENMP;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q8</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q16'))">
    <DefineConstants>Q16;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q16</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q16-OpenMP'))">
    <DefineConstants>Q16;OPENMP;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q16</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q16-HDRI'))">
    <DefineConstants>Q16HDRI;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q16-HDRI</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.EndsWith('Q16-HDRI-OpenMP'))">
    <DefineConstants>Q16HDRI;OPENMP;PLATFORM_$(Platform)</DefineConstants>
    <QuantumType>Q16-HDRI</QuantumType>
  </PropertyGroup>

  <PropertyGroup Condition="$(Configuration.StartsWith('Debug'))">
    <DefineConstants>$(DefineConstants);DEBUG_TEST</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
    <DefineConstants>$(DefineConstants);WINDOWS_BUILD</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="FakeItEasy" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" />
    <PackageReference Include="StyleCop.Analyzers">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="xunit.v3" />
    <PackageReference Include="xunit.runner.visualstudio">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <Compile Include="../Shared/ColorAssert.cs" Link="Asserts/ColorAssert.cs" />
    <Compile Include="../Shared/Files.cs" Link="TestHelpers/Files.cs" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="../../src/Magick.NET/Magick.NET.csproj" />
  </ItemGroup>

  <Import Project="../Magick.props" />
</Project>
