Skip to content

Commit 1856935

Browse files
authored
Add nuget targets file for cross plat packaging (#512)
1 parent cfbb6ac commit 1856935

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<NativeLibs Include="$(MSBuildThisFileDirectory)win-x64\*.dll"
5+
Condition="($([MSBuild]::IsOsPlatform('Windows')) And ('$(Platform)' == 'x64' Or '$(Platform)' == 'AnyCPU') And '$(RuntimeIdentifier)' == '') Or '$(RuntimeIdentifier)' == 'win-x64'" />
6+
<NativeLibs Include="$(MSBuildThisFileDirectory)win-x86\*.dll"
7+
Condition="($([MSBuild]::IsOsPlatform('Windows')) And '$(Platform)' == 'x86' And '$(RuntimeIdentifier)' == '') Or '$(RuntimeIdentifier)' == 'win-x86'" />
8+
<NativeLibs Include="$(MSBuildThisFileDirectory)linux-x64\*.so"
9+
Condition="($([MSBuild]::IsOsPlatform('Linux')) And '$(RuntimeIdentifier)' == '') Or '$(RuntimeIdentifier)' == 'linux-x64'" />
10+
<NativeLibs Include="$(MSBuildThisFileDirectory)osx-x64\*.dylib"
11+
Condition="($([MSBuild]::IsOsPlatform('OSX')) And '$(RuntimeIdentifier' == '') Or '$(RuntimeIdentifier)' == 'osx-x64'" />
12+
<None Include="@(NativeLibs)">
13+
<Link>%(FileName)%(Extension)</Link>
14+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
16+
</None>
17+
</ItemGroup>
18+
</Project>

0 commit comments

Comments
 (0)