Fix build error on missing Emscripten SDK to be more usable
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Flax.Build.NativeCpp;
|
||||
using Flax.Build.Platforms;
|
||||
@@ -23,6 +24,9 @@ public class GraphicsDeviceWebGPU : GraphicsDeviceBaseModule
|
||||
{
|
||||
base.Setup(options);
|
||||
|
||||
if (!EmscriptenSdk.Instance.IsValid)
|
||||
throw new Exception("Cannot build WebGPU for Web without Emscripten SDK. Check environment variable 'EMSDK'.");
|
||||
|
||||
var port = "--use-port=emdawnwebgpu:cpp_bindings=false";
|
||||
options.OutputFiles.Add(port);
|
||||
options.CompileEnv.CustomArgs.Add(port);
|
||||
|
||||
Reference in New Issue
Block a user