-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(platform): copy native libraries base on
RuntimeIdentifier
Also updates the README with instructions on how to install and configure your own project with ZenKitCS.
- Loading branch information
1 parent
5faa387
commit 71bb932
Showing
4 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- Well, I hate this. --> | ||
<PropertyGroup> | ||
<RuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Android'))">android-arm64</RuntimeIdentifier> | ||
<RuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux-x64</RuntimeIdentifier> | ||
<RuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('macOS'))">osx-x64</RuntimeIdentifier> | ||
<RuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Windows'))">win-x64</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<NativeAndroid Include="$(MSBuildThisFileDirectory)..\runtimes\android-arm64\native\libzenkitcapi.so" /> | ||
<NativeLinux Include="$(MSBuildThisFileDirectory)..\runtimes\linux-x64\native\libzenkitcapi.so" /> | ||
<NativeOSX Include="$(MSBuildThisFileDirectory)..\runtimes\osx-x64\native\libzenkitcapi.dylib" /> | ||
<NativeWindows Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\zenkitcapi.dll" /> | ||
</ItemGroup> | ||
<Target Name="CopyNativeLibraries" BeforeTargets="Build"> | ||
<Copy SourceFiles="@(NativeAndroid)" DestinationFiles="$(TargetDir)\runtimes\android-arm64\native\libzenkitcapi.so" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeLinux)" DestinationFiles="$(TargetDir)\runtimes\linux-x64\native\libzenkitcapi.so" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeOSX)" DestinationFiles="$(TargetDir)\runtimes\osx-x64\native\libzenkitcapi.dylib" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeWindows)" DestinationFiles="$(TargetDir)\runtimes\win-x64\native\zenkitcapi.dll" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeAndroid)" Condition="'$(RuntimeIdentifier)' == 'android-arm64'" DestinationFiles="$(TargetDir)\libzenkitcapi.so" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeLinux)" Condition="'$(RuntimeIdentifier)' == 'linux-x64'" DestinationFiles="$(TargetDir)\libzenkitcapi.so" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeOSX)" Condition="'$(RuntimeIdentifier)' == 'osx-x64'" DestinationFiles="$(TargetDir)\libzenkitcapi.dylib" ContinueOnError="true" /> | ||
<Copy SourceFiles="@(NativeWindows)" Condition="'$(RuntimeIdentifier)' == 'win-x64'" DestinationFiles="$(TargetDir)\zenkitcapi.dll" ContinueOnError="true" /> | ||
</Target> | ||
</Project> |