Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed May 16, 2024
1 parent f9beb47 commit 5ba05ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn addModules(
) !void {
inline for (.{ "pretty-table", "simargs" }) |name| {
_ = b.addModule(name, .{
.root_source_file = .{ .path = "src/mod/" ++ name ++ ".zig" },
.root_source_file = b.path("src/mod/" ++ name ++ ".zig"),
});

try all_tests.append(buildTestStep(b, .{ .mod = name }, target));
Expand Down Expand Up @@ -150,7 +150,7 @@ fn buildTestStep(
const name = comptime source.name();
const path = comptime source.path();
const exe_tests = b.addTest(.{
.root_source_file = .{ .path = path ++ "/" ++ name ++ ".zig" },
.root_source_file = b.path(path ++ "/" ++ name ++ ".zig"),
.target = target,
});
const test_step = b.step("test-" ++ name, "Run " ++ name ++ " tests");
Expand Down Expand Up @@ -191,10 +191,10 @@ fn makeCompileStep(

if (std.mem.eql(u8, name, "night-shift")) {
exe.linkSystemLibrary("objc");
exe.addFrameworkPath(.{ .path = "/System/Library/PrivateFrameworks" });
exe.addFrameworkPath(.{ .cwd_relative = "/System/Library/PrivateFrameworks" });
exe.linkFramework("CoreBrightness");
} else if (std.mem.eql(u8, name, "dark-mode")) {
exe.addFrameworkPath(.{ .path = "/System/Library/PrivateFrameworks" });
exe.addFrameworkPath(.{ .cwd_relative = "/System/Library/PrivateFrameworks" });
exe.linkFramework("SkyLight");
}
return exe;
Expand Down

0 comments on commit 5ba05ca

Please sign in to comment.