From b557da42d99e051fcf81088589054ac5a722ee1c Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 2 Jun 2024 12:44:02 -0700 Subject: [PATCH] update to Zig 2024.05 Signed-off-by: Stephen Gutekanst --- .gitignore | 2 +- build.zig | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 4a0641ed7..0ea71a8d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -zig-cache/ +.zig-cache/ zig-out/ \ No newline at end of file diff --git a/build.zig b/build.zig index 7262e23e4..ffe08162d 100644 --- a/build.zig +++ b/build.zig @@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void { const config_header = b.addConfigHeader( .{ - .style = .{ .cmake = .{ .path = "config.cmake.h.in" } }, + .style = .{ .cmake = b.path("config.cmake.h.in") }, .include_path = "config.h", }, .{ @@ -40,15 +40,15 @@ pub fn build(b: *std.Build) void { lib.linkLibC(); lib.defineCMacro("HAVE_CONFIG_H", null); lib.addConfigHeader(config_header); - lib.addIncludePath(.{ .path = "include" }); - lib.addIncludePath(.{ .path = "src/libFLAC/include" }); + lib.addIncludePath(b.path("include")); + lib.addIncludePath(b.path("src/libFLAC/include")); lib.addCSourceFiles(.{ .files = sources, .flags = &.{} }); if (target.os.tag == .windows) { lib.defineCMacro("FLAC__NO_DLL", null); lib.addCSourceFiles(.{ .files = sources_windows, .flags = &.{} }); } - lib.installConfigHeader(config_header, .{}); - lib.installHeadersDirectory("include", ""); + lib.installConfigHeader(config_header); + lib.installHeadersDirectory(b.path("include"), "", .{}); b.installArtifact(lib); }