portingtools/build.zig

24 lines
627 B
Zig
Raw Permalink Normal View History

2023-01-07 20:25:10 +01:00
const std = @import("std");
2024-04-14 19:31:34 +02:00
pub fn build(b: *std.Build) void {
2023-01-07 20:25:10 +01:00
const target = b.standardTargetOptions(.{});
2024-04-14 19:31:34 +02:00
const optimize = b.standardOptimizeOption(.{});
2023-01-07 20:25:10 +01:00
2023-02-06 19:00:57 +01:00
const exe = b.addExecutable(.{
.name = "portingtools",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
2024-04-14 19:31:34 +02:00
.optimize = optimize,
2023-02-06 19:00:57 +01:00
});
2024-04-14 19:31:34 +02:00
b.installArtifact(exe);
2023-01-07 20:25:10 +01:00
2024-04-14 19:31:34 +02:00
const run_cmd = b.addRunArtifact(exe);
2023-01-07 20:25:10 +01:00
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}