Set up .csproj for bindings which automatically places .dll/.so/.dylib in output directory

This commit is contained in:
Jørgen Lund
2020-10-22 23:31:45 +02:00
parent 73ef1190c3
commit 824e51ded7
2 changed files with 30 additions and 1 deletions
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<Content Include="$(ProjectDir)/SourcetrailDB.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SourcetrailDB.dll</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
<Content Include="$(ProjectDir)/SourcetrailDB.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SourcetrailDB.so</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))'">
<Content Include="$(ProjectDir)/SourcetrailDB.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SourcetrailDB.dylib</Link>
</Content>
</ItemGroup>
</Project>