build.zig: fix using as a dependency in other projects (#1505)

This commit is contained in:
T
2026-01-08 07:08:56 +01:00
committed by GitHub
parent be0abde71e
commit 70855b3290
+2 -1
View File
@@ -170,7 +170,8 @@ fn initLibConfig(b: *std.Build, target: std.Build.ResolvedTarget, lib: *Compile)
pub fn build(b: *std.Build) !void {
const io: Io = if (is_zig_16) b.graph.io else {};
const cwd = if (is_zig_16) Dir.cwd() else std.fs.cwd();
const root_path = b.pathFromRoot(".");
const cwd = try if (is_zig_16) Dir.cwd().openDir(io, root_path, .{}) else std.fs.cwd().openDir(root_path, .{});
const src_path = "src/libsodium";
const src_dir = if (is_zig_16)