fix build.zig in examples to install executable correctly
This commit is contained in:
parent
c819b5e38b
commit
07a2a47ba5
|
|
@ -71,11 +71,15 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossT
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
b.installArtifact(exe);
|
const install_cmd = b.addInstallArtifact(exe, .{});
|
||||||
var run = b.addRunArtifact(exe);
|
|
||||||
run.cwd = module;
|
const run_cmd = b.addRunArtifact(exe);
|
||||||
b.step(name, name).dependOn(&run.step);
|
run_cmd.step.dependOn(&install_cmd.step);
|
||||||
all.dependOn(&exe.step);
|
|
||||||
|
const run_step = b.step(name, name);
|
||||||
|
run_step.dependOn(&run_cmd.step);
|
||||||
|
|
||||||
|
all.dependOn(&install_cmd.step);
|
||||||
}
|
}
|
||||||
return all;
|
return all;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user