mach: fix building for wasm32 target
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
142c8b5b2e
commit
9c14e617c9
1 changed files with 16 additions and 16 deletions
14
build.zig
14
build.zig
|
|
@ -55,6 +55,13 @@ pub fn build(b: *std.Build) !void {
|
|||
const optimize = b.standardOptimizeOption(.{});
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
const gpu_dawn_options = gpu_dawn.Options{
|
||||
.from_source = b.option(bool, "dawn-from-source", "Build Dawn from source") orelse false,
|
||||
.debug = b.option(bool, "dawn-debug", "Use a debug build of Dawn") orelse false,
|
||||
};
|
||||
const options = Options{ .core = .{ .gpu_dawn_options = gpu_dawn_options } };
|
||||
|
||||
if (target.getCpuArch() != .wasm32) {
|
||||
const app = b.addExecutable(.{
|
||||
.name = "mach",
|
||||
.root_source_file = .{ .path = "app/main.zig" },
|
||||
|
|
@ -71,13 +78,6 @@ pub fn build(b: *std.Build) !void {
|
|||
const app_run_step = b.step("run", "Run Mach Engine Application");
|
||||
app_run_step.dependOn(&app_run_cmd.step);
|
||||
|
||||
const gpu_dawn_options = gpu_dawn.Options{
|
||||
.from_source = b.option(bool, "dawn-from-source", "Build Dawn from source") orelse false,
|
||||
.debug = b.option(bool, "dawn-debug", "Use a debug build of Dawn") orelse false,
|
||||
};
|
||||
const options = Options{ .core = .{ .gpu_dawn_options = gpu_dawn_options } };
|
||||
|
||||
if (target.getCpuArch() != .wasm32) {
|
||||
const all_tests_step = b.step("test", "Run library tests");
|
||||
const core_test_step = b.step("test-core", "Run Core library tests");
|
||||
const ecs_test_step = b.step("test-ecs", "Run ECS library tests");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue