dotfiles/scripts/alecor/build.zig

28 lines
711 B
Zig
Raw Normal View History

2023-08-08 19:09:43 +02:00
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "alecor",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
2024-03-20 20:45:59 +01:00
exe.root_module.addImport("common", b.dependency("common", .{}).module("common"));
2023-08-08 19:09:43 +02:00
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
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);
}