Skip to content

Commit 34e9dea

Browse files
Copilotphilstopford
andcommitted
Fix libveldrid-spirv.so native library copying for proper SPIRV shader compilation on Linux
Co-authored-by: philstopford <1983851+philstopford@users.noreply.github.com>
1 parent 6c38a77 commit 34e9dea

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

Directory.Build.targets

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,29 @@
2828
SkipUnchangedFiles="true"
2929
ContinueOnError="true"/>
3030

31-
<!-- Try the ppy.Veldrid.SPIRV package path if the official one failed -->
31+
<!-- Try the ppy.Veldrid.SPIRV package path for Linux -->
3232
<Copy
3333
SourceFiles="$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))ppy.veldrid.spirv\1.0.15-gfbb03d21c2\runtimes\linux-x64\native\libveldrid-spirv.so"
3434
DestinationFolder="$(OutputPath)"
3535
SkipUnchangedFiles="true"
36-
ContinueOnError="true"
37-
Condition="$(RuntimeIdentifier.Contains('linux')) OR $(RuntimeID) == 'linux-x64'"/>
36+
ContinueOnError="false"
37+
Condition="$([MSBuild]::IsOSPlatform('Linux'))"/>
38+
39+
<!-- Try the ppy.Veldrid.SPIRV package path for Windows -->
40+
<Copy
41+
SourceFiles="$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))ppy.veldrid.spirv\1.0.15-gfbb03d21c2\runtimes\win-x64\native\libveldrid-spirv.dll"
42+
DestinationFolder="$(OutputPath)"
43+
SkipUnchangedFiles="true"
44+
ContinueOnError="false"
45+
Condition="$([MSBuild]::IsOSPlatform('Windows'))"/>
46+
47+
<!-- Try the ppy.Veldrid.SPIRV package path for macOS -->
48+
<Copy
49+
SourceFiles="$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))ppy.veldrid.spirv\1.0.15-gfbb03d21c2\runtimes\osx\native\libveldrid-spirv.dylib"
50+
DestinationFolder="$(OutputPath)"
51+
SkipUnchangedFiles="true"
52+
ContinueOnError="false"
53+
Condition="$([MSBuild]::IsOSPlatform('OSX'))"/>
3854
</Target>
3955

4056
<Target Name="Cleanup" AfterTargets="SetPaths" Condition="$(Configuration.Contains('Release'))">

0 commit comments

Comments
 (0)