build: update build.zig

This commit is contained in:
utox39
2025-08-25 01:40:43 +02:00
parent 1c97ed3685
commit b7ba91d664

View File

@@ -17,9 +17,11 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{ const exe = b.addExecutable(.{
.name = "zigfetch", .name = "zigfetch",
.root_source_file = b.path("src/main.zig"), .root_module = b.createModule(.{
.target = target, .root_source_file = b.path("src/main.zig"),
.optimize = optimize, .target = target,
.optimize = optimize,
}),
}); });
if (target.result.os.tag == .macos) { if (target.result.os.tag == .macos) {
@@ -61,9 +63,11 @@ pub fn build(b: *std.Build) void {
run_step.dependOn(&run_cmd.step); run_step.dependOn(&run_cmd.step);
const exe_unit_tests = b.addTest(.{ const exe_unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"), .root_module = b.createModule(.{
.target = target, .root_source_file = b.path("src/main.zig"),
.optimize = optimize, .target = target,
.optimize = optimize,
}),
}); });
const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);