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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <WarnOn>3390;$(WarnOn)</WarnOn>
    <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>

    <DefineConstants>$(DefineConstants);TREAT_OPENGL_LINK_FAILURE_AS_ERROR</DefineConstants>
    <Configurations>Release;Debug</Configurations>
    <OtherFlags>
      --warn:5 --warnaserror
    </OtherFlags>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\lib\engine\src\Womb\Womb.fsproj">
      <Properties Condition="$(DefineConstants.Contains('TREAT_OPENGL_LINK_FAILURE_AS_ERROR'))">
        DefineConstants=$(DefineConstants);TREAT_OPENGL_LINK_FAILURE_AS_ERROR
      </Properties>
    </ProjectReference>
    
    <!-- Copy shaders on build -->
    <Content Include="Assets\Shaders\**\*.glsl" >
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    
    <!-- Types -->
    <Compile Include="Brushes/Types.fs" />
    <Compile Include="UI/Types.fs" />
    <Compile Include="Scene/Types.fs" />
    <Compile Include="Types.fs" />
    <!-- Debug Scene -->
    <Compile Include="UI/DebugMouse.fs" />
    <!-- Rendered objects -->
    <Compile Include="Brushes/CircleBrush.fs" />
    <Compile Include="Brushes/LineBrush.fs" />
    <Compile Include="UI/Button.fs" />
    <Compile Include="UI/Canvas.fs" />
    <Compile Include="UI/CommandPanel.fs" />
    <!-- Game scenes -->
    <Compile Include="Scene/DebugScene.fs" />
    <Compile Include="Scene/DrawSceneHandlers.fs" />
    <Compile Include="Scene/DrawScene.fs" />
    <!-- Main -->
    <Compile Include="Program.fs" />

    <PackageReference Include="Argu" Version="6.1.1">
      <GeneratePathProperty></GeneratePathProperty>
    </PackageReference>
  </ItemGroup>
</Project>
