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

  <PropertyGroup>
    <TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks>
    <LangVersion>11.0</LangVersion>
    <GenerateTargetFrameworkAttribute>False</GenerateTargetFrameworkAttribute>
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
    <Title>Parlo</Title>
    <Authors>matsvederhus</Authors>
    <PackageProjectUrl>http://www.github.com/afr0/parlo</PackageProjectUrl>
    <NeutralLanguage>en-001</NeutralLanguage>
    <PackageTags>UDP;TCP;network;networking;encryption;security</PackageTags>
    <RepositoryType>git</RepositoryType>
    <Description>A simple and scalable networking library for .NET Standard. Supports TCP and UDP with optional reliable delivery.
Applies adaptive compression with GZip to packets for extra smooth network traffic.</Description>
    <Copyright>Copyright Mats Vederhus</Copyright>
    <RepositoryUrl>https://github.com/Afr0/Parlo.git</RepositoryUrl>
    <PackageReleaseNotes>Version 1.2.0.0: Added support for Linux.</PackageReleaseNotes>
    <PackageLicenseExpression>MPL-2.0</PackageLicenseExpression>
    <GenerateDocumentationFile>True</GenerateDocumentationFile>
    <PackageReadmeFile>README.md</PackageReadmeFile>
    <AssemblyVersion>1.2.0.0</AssemblyVersion>
    <FileVersion>1.2.0.0</FileVersion>
    <OS>Linux</OS>
    <Configurations>Debug;DebugLinux;ReleaseWindows;ReleaseLinux</Configurations>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'ReleaseWindows'">
    <IncludeWindowsSpecificCode>true</IncludeWindowsSpecificCode>
    <DefineConstants>TRACE;RELEASE;NETSTANDARD2_1;NET6_0</DefineConstants>
    <Optimize>true</Optimize>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'ReleaseLinux'">
    <IncludeWindowsSpecificCode>false</IncludeWindowsSpecificCode>
    <DefineConstants>TRACE;RELEASE;NETSTANDARD2_1;NET6_0;LINUX</DefineConstants>
    <Optimize>true</Optimize>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'DebugLinux'">
    <IncludeWindowsSpecificCode>false</IncludeWindowsSpecificCode>
    <DefineConstants>DEBUG;TRACE;NETSTANDARD2_1;NET6_0;LINUX</DefineConstants>
    <Optimize>false</Optimize>
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <DefineConstants>DEBUG;TRACE;NETSTANDARD2_1;NET6_0</DefineConstants>
    <Optimize>false</Optimize>
    <DebugType>portable</DebugType>
  </PropertyGroup>

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

  <PropertyGroup Condition="'$(OS)' == 'Unix'">
    <DefineConstants>LINUX</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(OS)' == 'OSX'">
    <DefineConstants>MACOS</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(IncludeWindowsSpecificCode)' == 'true'">
    <DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
      <None Include="README.md" Pack="true" PackagePath="\" />
  </ItemGroup>

  <ItemGroup>
    <Compile Remove="*.png" />
    <Compile Remove="*.md" />
    <Compile Remove="*.gitignore" />
    <Compile Remove="*.gitattributes" />
    <Compile Remove="*.csproj.user" />
    <Compile Remove="Properties\**" />
    <Compile Remove="tests\**" />
    <EmbeddedResource Remove="Properties\**" />
    <EmbeddedResource Remove="tests\**" />
    <None Remove="Properties\**" />
    <None Remove="tests\**" />
  </ItemGroup>

  <ItemGroup>
    <None Remove=".gitattributes" />
    <None Remove=".gitignore" />
    <None Remove="LICENSE" />
    <None Remove="Logo.png" />
    <None Remove="packages.config" />
  </ItemGroup>
  
  <ItemGroup Condition="'$(Configuration)' == 'ReleaseWindows'">
    <PackageReference Include="System.Management" Version="8.0.0" />
  </ItemGroup>
</Project>
