Merge pull request #150 from Sergio0694/bugfix/native-library-loading
Improved native libraries handling on different platforms
このコミットが含まれているのは:
1ファイル変更
+61
-22
@@ -12,28 +12,67 @@
|
||||
<PackageReference Include="TerraFX.Interop.D3D12MemoryAllocator" Version="2.0.0-beta2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Libraries\x64\dxcompiler.dll"
|
||||
Link="runtimes\win-x64\native\dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-x64\native" />
|
||||
<None Include="Libraries\x64\dxil.dll"
|
||||
Link="runtimes\win-x64\native\dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-x64\native" />
|
||||
<None Include="Libraries\arm64\dxcompiler.dll"
|
||||
Link="runtimes\win-arm64\native\dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-arm64\native" />
|
||||
<None Include="Libraries\arm64\dxil.dll"
|
||||
Link="runtimes\win-arm64\native\dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-arm64\native" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
|
||||
<!-- When building locally for x64/ARM64 (using the project through a project reference),
|
||||
just copy the right native libraries to the output directory, with no subfolders. -->
|
||||
<When Condition="'$(Platform)' == 'x64'">
|
||||
<ItemGroup>
|
||||
<None Include="Libraries\x64\dxcompiler.dll"
|
||||
Link="dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest" />
|
||||
<None Include="Libraries\x64\dxil.dll"
|
||||
Link="dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="'$(Platform)' == 'ARM64'">
|
||||
<ItemGroup>
|
||||
<None Include="Libraries\arm64\dxcompiler.dll"
|
||||
Link="dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest" />
|
||||
<None Include="Libraries\arm64\dxil.dll"
|
||||
Link="dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
|
||||
<!-- When no RID is specified, it means the NuGet package is being packed. In this
|
||||
case, copy all native libraries to the right runtimes/<RID>/native directory,
|
||||
which will automatically be used by NuGet to deploy the right libs to consumers.
|
||||
Still keep the link target to get the libraries to be copied to the output, which
|
||||
allows them to be found even when running the library locally in Any CPU. This will
|
||||
make life easier for developers using a project reference with an incorrect configuration,
|
||||
while still not causing any change in the final NuGet package (Link isn't looked up there). -->
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<None Include="Libraries\x64\dxcompiler.dll"
|
||||
Link="runtimes\win-x64\native\dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-x64\native" />
|
||||
<None Include="Libraries\x64\dxil.dll"
|
||||
Link="runtimes\win-x64\native\dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-x64\native" />
|
||||
<None Include="Libraries\arm64\dxcompiler.dll"
|
||||
Link="runtimes\win-arm64\native\dxcompiler.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-arm64\native" />
|
||||
<None Include="Libraries\arm64\dxil.dll"
|
||||
Link="runtimes\win-arm64\native\dxil.dll"
|
||||
Visible="False"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
PackFolder="runtimes\win-arm64\native" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする