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

    <PropertyGroup>
        <RootNamespace>JustCRC32C</RootNamespace>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <Title>Just CRC32C</Title>
        <Authors>bartimaeusnek</Authors>
        <Description>Just a simple and fast CRC32C Wrapper with hardware acceleration.</Description>
        <Copyright>2023</Copyright>
        <PackageProjectUrl>https://github.com/bartimaeusnek/Just-CRC32C</PackageProjectUrl>
        <PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
        <RepositoryUrl>https://github.com/bartimaeusnek/Just-CRC32C</RepositoryUrl>
        <RepositoryType>git</RepositoryType>
        <PackageTags>CRC32C</PackageTags>
        <Version>1.1.0</Version>
        <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
        <TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.0</TargetFrameworks>
        <LangVersion>10</LangVersion>
        <PackageReadmeFile>README.md</PackageReadmeFile>
    </PropertyGroup>
    
    <ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
        <PackageReference Include="System.Memory" Version="4.5.5" />
        <None Remove="libJustCRC32C_Native.dll" />
        <EmbeddedResource Include="libJustCRC32C_Native.dll">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </EmbeddedResource>
    </ItemGroup>
    
    <ItemGroup>
        <None Include="libJustCRC32C_Native.dll" Pack="true" PackagePath="\lib\netstandard2.0"/>
        <None Include="..\README.md" Pack="true" PackagePath="\" />
    </ItemGroup>

    <PropertyGroup Label="Package-SourceLink">
        <PublishRepositoryUrl>true</PublishRepositoryUrl>
        <EmbedUntrackedSources>true</EmbedUntrackedSources>
        <DebugType>embedded</DebugType>
    </PropertyGroup>

    <PropertyGroup Label="Package-ReproducibleBuild">
        <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
    </PropertyGroup>

    <ItemGroup Label="ItemGroup-SourceLink">
        <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
    </ItemGroup>
    
    <ItemGroup>
        <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
            <_Parameter1>$(MSBuildProjectName).Test</_Parameter1>
        </AssemblyAttribute>
        <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
            <_Parameter1>$(MSBuildProjectName).Benchmark</_Parameter1>
        </AssemblyAttribute>
        <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
            <_Parameter1>$(MSBuildProjectName).TestNF</_Parameter1>
        </AssemblyAttribute>
    </ItemGroup>
    
    <ItemGroup>
      <Compile Update="CRC32C.ARM.cs">
        <DependentUpon>CRC32C.cs</DependentUpon>
      </Compile>
      <Compile Update="CRC32C.SSE42.cs">
        <DependentUpon>CRC32C.cs</DependentUpon>
      </Compile>
      <Compile Update="CRC32C.Software.cs">
        <DependentUpon>CRC32C.cs</DependentUpon>
      </Compile>
      <Compile Update="CRC32C.LookupTable.cs">
        <DependentUpon>CRC32C.cs</DependentUpon>
      </Compile>
      <Compile Update="CRC32C.Software.LookupTable.cs">
        <DependentUpon>CRC32C.Software.cs</DependentUpon>
      </Compile>
      <Compile Update="CRC32C.NetStandard.cs">
        <DependentUpon>CRC32C.cs</DependentUpon>
      </Compile>
    </ItemGroup>
    
</Project>
