Skip to content

Commit

Permalink
addPaths(step) -> addPaths(mod)
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Feb 2, 2024
1 parent 072635a commit e7c2abb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});
addPaths(lib); // just for testing
addPathsToModule(&lib.root_module); // just for testing
addPaths(&lib.root_module); // just for testing
lib.linkLibC();
lib.installHeadersDirectory("include", ".");
b.installArtifact(lib);
}

pub fn addPaths(step: *std.Build.Step.Compile) void {
step.addSystemFrameworkPath(.{ .path = sdkPath("/Frameworks") });
step.addSystemIncludePath(.{ .path = sdkPath("/include") });
step.addLibraryPath(.{ .path = sdkPath("/lib") });
}

pub fn addPathsToModule(mod: *std.Build.Module) void {
pub fn addPaths(mod: *std.Build.Module) void {
mod.addSystemFrameworkPath(.{ .path = sdkPath("/Frameworks") });
mod.addSystemIncludePath(.{ .path = sdkPath("/include") });
mod.addLibraryPath(.{ .path = sdkPath("/lib") });
Expand Down

0 comments on commit e7c2abb

Please sign in to comment.