mach: update to latest Zig build API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-04-25 09:54:25 -07:00 committed by Stephen Gutekanst
parent 0a435d36a7
commit e4fd26c8e7

View file

@ -118,13 +118,14 @@ pub fn build(b: *std.Build) !void {
try shaderexp_app.link(options);
shaderexp_app.install();
const shaderexp_compile_step = b.step("shaderexp", "Compile shaderexp");
shaderexp_compile_step.dependOn(&shaderexp_app.getInstallStep().?.step);
const shaderexp_install_step = b.step("shaderexp", "Install shaderexp");
shaderexp_install_step.dependOn(&shaderexp_app.getInstallStep().?.step);
const shaderexp_run_cmd = shaderexp_app.addRunArtifact();
shaderexp_run_cmd.step.dependOn(shaderexp_install_step);
const shaderexp_run_cmd = shaderexp_app.run();
shaderexp_run_cmd.step.dependOn(&shaderexp_app.getInstallStep().?.step);
const shaderexp_run_step = b.step("run-shaderexp", "Run shaderexp");
shaderexp_run_step.dependOn(&shaderexp_run_cmd.step);
b.getInstallStep().dependOn(shaderexp_install_step);
}
const compile_all = b.step("compile-all", "Compile Mach");
@ -215,8 +216,8 @@ pub const App = struct {
app.core.install();
}
pub fn run(app: *const App) *std.build.RunStep {
return app.core.run();
pub fn addRunArtifact(app: *const App) *std.build.RunStep {
return app.core.addRunArtifact();
}
pub fn getInstallStep(app: *const App) ?*std.build.InstallArtifactStep {