From c1bcd1f780a048870db6d05206e0736a8f1ae380 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 2 Jun 2024 12:26:31 -0700 Subject: [PATCH] update to Zig 2024.05 Signed-off-by: Stephen Gutekanst --- .gitignore | 1 + build.zig | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a9239f4..68fb74b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # Zig stuff /zig-* +.zig-cache \ No newline at end of file diff --git a/build.zig b/build.zig index 8e360e7..bc5b336 100644 --- a/build.zig +++ b/build.zig @@ -11,23 +11,23 @@ pub fn build(b: *std.Build) void { .root_source_file = b.addWriteFiles().add("empty.c", ""), }); if (target.result.cpu.arch == .x86_64 and target.result.os.tag == .windows) { - lib.addLibraryPath(.{ .path = "x86_64" }); + lib.addLibraryPath(b.path("x86_64")); lib.linkSystemLibrary("dxguid"); lib.linkSystemLibrary("dxgi"); } b.installArtifact(lib); - lib.installHeadersDirectory("include", "."); + lib.installHeadersDirectory(b.path("include"), ".", .{}); } // TODO(build-system): this is needed because lib2.linkLibrary(lib) // will not add the library path transitively to lib3.linkLibrary(lib2) pub fn addLibraryPath(step: *std.Build.Step.Compile) void { - step.addLibraryPath(.{ .path = sdkPath("/x86_64") }); + step.addLibraryPath(.{ .cwd_relative = sdkPath("/x86_64") }); } pub fn addLibraryPathToModule(module: *std.Build.Module) void { - module.addLibraryPath(.{ .path = sdkPath("/x86_64") }); + module.addLibraryPath(.{ .cwd_relative = sdkPath("/x86_64") }); } fn sdkPath(comptime suffix: []const u8) []const u8 {