Skip to content

Commit

Permalink
update to Zig 2024.05
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
  • Loading branch information
slimsag committed Jun 2, 2024
1 parent 485f086 commit 30eb809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
zig-cache/
zig-out/
.zig-cache/
zig-out/
13 changes: 4 additions & 9 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void {

const config_header = b.addConfigHeader(
.{
.style = .{ .cmake = .{ .path = "include/ogg/config_types.h.in" } },
.style = .{ .cmake = b.path("include/ogg/config_types.h.in") },
.include_path = "ogg/config_types.h",
},
.{
Expand All @@ -29,17 +29,12 @@ pub fn build(b: *std.Build) void {
});
lib.linkLibC();
lib.addConfigHeader(config_header);
lib.addIncludePath(.{ .path = "include" });
lib.addIncludePath(b.path("include"));
lib.addCSourceFiles(.{ .files = &sources, .flags = &.{"-fno-sanitize=undefined"} });
lib.installHeadersDirectoryOptions(.{
.source_dir = .{ .path = "include/ogg" },
.install_dir = .header,
.install_subdir = "ogg",
lib.installHeadersDirectory(b.path("include/ogg"), "ogg", .{
.exclude_extensions = &.{".in"},
});
lib.installConfigHeader(config_header, .{
.dest_rel_path = "ogg/config_types.h",
});
lib.installConfigHeader(config_header);
b.installArtifact(lib);
}

Expand Down

0 comments on commit 30eb809

Please sign in to comment.