Skip to content

Commit

Permalink
addPaths(step) -> addPaths(mod); helps hexops/mach#1154
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Feb 2, 2024
1 parent 25ab6bc commit a38ea61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});
addPaths(main_tests);
sysaudio.addPaths(&main_tests.root_module);
b.installArtifact(main_tests);

const test_step = b.step("test", "Run library tests");
Expand All @@ -44,7 +44,7 @@ pub fn build(b: *std.Build) void {
});
example.root_module.addImport("mach-opus", module);
example.root_module.addImport("mach-sysaudio", sysaudio_dep.module("mach-sysaudio"));
addPaths(example);
sysaudio.addPaths(&example.root_module);
b.installArtifact(example);

const example_run_cmd = b.addRunArtifact(example);
Expand All @@ -53,13 +53,3 @@ pub fn build(b: *std.Build) void {
const example_run_step = b.step("run-example", "Run example");
example_run_step.dependOn(&example_run_cmd.step);
}

pub fn addPaths(step: *std.Build.Step.Compile) void {
sysaudio.addPaths(step);
}

pub fn link(b: *std.Build, step: *std.Build.Step.Compile) void {
_ = b;
_ = step;
@panic("link(b, step) has been deprecated, use addPaths(step) instead");
}
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
.hash = "12205b82e9375d940b78e8c7df0b84bd1015c9a8c5b2a6b6ff2c21454a2763ef7aa6",
},
.mach_sysaudio = .{
.url = "https://pkg.machengine.org/mach-sysaudio/8e4d73150af291d63a5390b157552ce0bbcd4a1d.tar.gz",
.hash = "12206c2ca0378bbc54721553e8167c037325e95e2791379fbe0e245a34334679dc90",
.url = "https://pkg.machengine.org/mach-sysaudio/ce8ab30dd300b822224d14997c58c06520b642c9.tar.gz",
.hash = "12203f0d4afc83bae8571434ff48a459732c15c9542df13e0a97baedc73212d355a1",
},
.linux_audio_headers = .{
.url = "https://pkg.machengine.org/linux-audio-headers/302c41dc4ab5fa292c3062e9e0d26c7f62652740.tar.gz",
Expand Down

0 comments on commit a38ea61

Please sign in to comment.