binding/SkiaSharp.NativeAssets.WebAssembly/buildTransitive/SkiaSharp.targets (20 lines of code) (raw):

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- If this is an UNO Platform app --> <ItemGroup Condition="'$(IsUnoHead)' == 'True' and '$(UnoRuntimeIdentifier)' == 'WebAssembly'"> <Content Include="@(SkiaSharpStaticLibrary)" Visible="false" /> </ItemGroup> <ItemGroup Condition="'$(IsUnoHead)' == 'True' and '$(UnoRuntimeIdentifier)' == 'WebAssembly'"> <!-- Include the GL symbol when running under net7 (https://github.com/dotnet/runtime/issues/76077) --> <WasmShellEmccExportedRuntimeMethod Include="GL" /> <!-- Include the emscripten_gl* symbols in net8 --> <WasmShellExtraEmccFlags Include="-s USE_WEBGL2=1"/> <!-- Enable GLCtx when threading is available --> <WasmShellExtraEmccFlags Condition="'$(WasmShellEnableThreads)'=='True'" Include="-s OFFSCREEN_FRAMEBUFFER=1" /> </ItemGroup> <!-- If this is a ASP.NET Blazor web assembly app --> <PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true'"> <WasmBuildNative Condition="'$(WasmBuildNative)' == ''">true</WasmBuildNative> <EmccExtraLDFlags>$(EmccExtraLDFlags) -s USE_WEBGL2=1</EmccExtraLDFlags> </PropertyGroup> <ItemGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(TargetFrameworkVersion)' != ''"> <NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\2.0.23\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))" /> <NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.12\st\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0'))" /> <NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.34\st\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0'))" /> <NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.34\st\*.a" Condition="$([MSBuild]::VersionGreaterThan($(TargetFrameworkVersion), '8.0'))" /> </ItemGroup> </Project>