Update native build
This commit is contained in:
parent
1bd0e2ee19
commit
937594d0bf
2 changed files with 20 additions and 19 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
|
@ -60,7 +60,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: linux-x64
|
name: linux-x64
|
||||||
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/libraylib.so
|
path: Raylib-cs.Native/bin/Release/native/raylib/libraylib.so
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-osx:
|
build-osx:
|
||||||
|
|
@ -93,7 +93,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: osx-${{ matrix.name }}
|
name: osx-${{ matrix.name }}
|
||||||
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/libraylib.dylib
|
path: Raylib-cs.Native/bin/Release/native/raylib/libraylib.dylib
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
|
|
@ -126,7 +126,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: win-${{ matrix.name }}
|
name: win-${{ matrix.name }}
|
||||||
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/Release/raylib.dll
|
path: Raylib-cs.Native/bin/Release/native/raylib/Release/raylib.dll
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-publish:
|
build-publish:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="ConfigureNative">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<AssemblyName>Raylib-cs.Native</AssemblyName>
|
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="../Raylib-cs/Build.props" />
|
<Import Project="../Raylib-cs/Build.props" />
|
||||||
|
|
@ -24,34 +24,35 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content
|
<Content
|
||||||
Include="$(IntermediateOutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)"
|
Include="$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)"
|
||||||
Link="%(Filename)%(Extension)"
|
Link="%(Filename)%(Extension)"
|
||||||
CopyToOutputDirectory="PreserveNewest"
|
CopyToOutputDirectory="PreserveNewest"
|
||||||
Condition="Exists('$(IntermediateOutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)')" />
|
Condition="Exists('$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)')" />
|
||||||
<CMakeArgs Include="-B $(IntermediateOutputPath)native" />
|
|
||||||
<CMakeArgs Include="-S $(IntermediateOutputPath)raylib-$(TargetRaylibTag)" />
|
<CMakeArgs Include="-B $(OutputPath)native" />
|
||||||
|
<CMakeArgs Include="-S $(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)" />
|
||||||
<CMakeArgs Include="-D CMAKE_BUILD_TYPE=$(Configuration)" />
|
<CMakeArgs Include="-D CMAKE_BUILD_TYPE=$(Configuration)" />
|
||||||
<CMakeArgs Include="-D BUILD_SHARED_LIBS=ON" />
|
<CMakeArgs Include="-D BUILD_SHARED_LIBS=ON" />
|
||||||
<CMakeArgs Include="-D BUILD_EXAMPLES=OFF" />
|
<CMakeArgs Include="-D BUILD_EXAMPLES=OFF" />
|
||||||
<!-- <CMakeArgs Include="-D GRAPHICS=GRAPHICS_API_OPENGL_43" /> -->
|
<!-- <CMakeArgs Include="-D GRAPHICS=GRAPHICS_API_OPENGL_43" /> -->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="ConfigureNative" BeforeTargets="BuildNative" Condition="$(SkipLocalBuild) != true">
|
<Target Name="ConfigureNative" Condition="$(SkipLocalBuild) != true">
|
||||||
<DownloadFile
|
<DownloadFile
|
||||||
SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(TargetRaylibTag).zip"
|
SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(TargetRaylibTag).zip"
|
||||||
DestinationFolder="$(IntermediateOutputPath)"
|
DestinationFolder="$(BaseIntermediateOutputPath)"
|
||||||
DestinationFileName="raylib.zip"
|
DestinationFileName="raylib.zip"
|
||||||
Condition="!Exists('$(IntermediateOutputPath)raylib.zip')" />
|
Condition="!Exists('$(BaseIntermediateOutputPath)raylib.zip')" />
|
||||||
<Unzip
|
|
||||||
SourceFiles="$(IntermediateOutputPath)raylib.zip"
|
|
||||||
DestinationFolder="$(IntermediateOutputPath)"
|
|
||||||
OverwriteReadOnlyFiles="true"
|
|
||||||
Condition="!Exists('$(IntermediateOutputPath)raylib-$(TargetRaylibTag)')" />
|
|
||||||
<Exec Command="cmake @(CMakeArgs, ' ') $(CMakeExtraArgs)"
|
|
||||||
Condition="!Exists('$(IntermediateOutputPath)native/CMakeCache.txt')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="BuildNative" BeforeTargets="BeforeBuild" Condition="$(SkipLocalBuild) != true">
|
<Unzip
|
||||||
<Exec Command="cmake --build $(IntermediateOutputPath)native --config $(Configuration)" />
|
SourceFiles="$(BaseIntermediateOutputPath)raylib.zip"
|
||||||
|
DestinationFolder="$(BaseIntermediateOutputPath)"
|
||||||
|
OverwriteReadOnlyFiles="true"
|
||||||
|
Condition="!Exists('$(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)')" />
|
||||||
|
|
||||||
|
<Exec Command="cmake @(CMakeArgs, ' ') $(CMakeExtraArgs)"
|
||||||
|
Condition="!Exists('$(BaseIntermediateOutputPath)native/CMakeCache.txt')" />
|
||||||
|
|
||||||
|
<Exec Command="cmake --build $(OutputPath)native --config $(Configuration)" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue