zig: run examples from their directories

So that they can find their respective resource folders.
This commit is contained in:
Mike Will 2024-06-13 10:01:06 -04:00
parent 735c0160b5
commit 25a32846ba

View File

@ -75,6 +75,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
const install_cmd = b.addInstallArtifact(exe, .{}); const install_cmd = b.addInstallArtifact(exe, .{});
const run_cmd = b.addRunArtifact(exe); const run_cmd = b.addRunArtifact(exe);
run_cmd.cwd = b.path(module);
run_cmd.step.dependOn(&install_cmd.step); run_cmd.step.dependOn(&install_cmd.step);
const run_step = b.step(name, name); const run_step = b.step(name, name);