You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.4 KiB
62 lines
2.4 KiB
<Project Sdk="Microsoft.NET.Sdk"> |
|
|
|
<PropertyGroup> |
|
<TargetFramework>net8.0</TargetFramework> |
|
<ImplicitUsings>enable</ImplicitUsings> |
|
<Nullable>enable</Nullable> |
|
<RootNamespace>Bit.RustSDK</RootNamespace> |
|
<UserSecretsId>Bit.RustSDK</UserSecretsId> |
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
|
</PropertyGroup> |
|
|
|
<ItemGroup> |
|
<!-- This is a work around because this file is compiled by the PreBuild event below, and won't |
|
always be detected --> |
|
<Compile Remove="NativeMethods.g.cs" /> |
|
</ItemGroup> |
|
|
|
<ItemGroup> |
|
<Compile Include="NativeMethods.g.cs" /> |
|
|
|
<Content Include="rust/target/release/libsdk*.dylib"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/osx-arm64/native/libsdk.dylib</Link> |
|
</Content> |
|
<Content Include="./rust/target/release/libsdk*.so"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/linux-x64/native/libsdk.so</Link> |
|
</Content> |
|
<Content Include="./rust/target/release/libsdk*.dll"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/windows-x64/native/libsdk.dll</Link> |
|
</Content> |
|
</ItemGroup> |
|
|
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> |
|
<Exec Command="cargo build --release" WorkingDirectory="$(ProjectDir)/rust" /> |
|
<ItemGroup> |
|
<Compile Include="NativeMethods.g.cs" /> |
|
|
|
<!-- Include native libraries after they've been built --> |
|
<Content Include="rust/target/release/libsdk*.dylib"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/osx-arm64/native/libsdk.dylib</Link> |
|
</Content> |
|
<Content Include="./rust/target/release/libsdk*.so"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/linux-x64/native/libsdk.so</Link> |
|
</Content> |
|
<Content Include="./rust/target/release/libsdk*.dll"> |
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
<PackageCopyToOutput>true</PackageCopyToOutput> |
|
<Link>runtimes/windows-x64/native/libsdk.dll</Link> |
|
</Content> |
|
</ItemGroup> |
|
</Target> |
|
|
|
</Project>
|
|
|