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 <[email protected]>
  • Loading branch information
emidoots committed Jun 2, 2024
1 parent cb19b23 commit c97923f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Zig stuff
/zig-*
.zig-cache
25 changes: 6 additions & 19 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,12 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});

installHeadersDirectoryExcludeLicenseFiles(lib, "alsa-lib", ".");
installHeadersDirectoryExcludeLicenseFiles(lib, "jack", "jack");
installHeadersDirectoryExcludeLicenseFiles(lib, "pipewire", "pipewire");
installHeadersDirectoryExcludeLicenseFiles(lib, "pulse", "pulse");
installHeadersDirectoryExcludeLicenseFiles(lib, "sndio", ".");
installHeadersDirectoryExcludeLicenseFiles(lib, "spa", "spa");
lib.installHeadersDirectory(b.path("alsa-lib"), ".", .{});
lib.installHeadersDirectory(b.path("jack"), "jack", .{});
lib.installHeadersDirectory(b.path("pipewire"), "pipewire", .{});
lib.installHeadersDirectory(b.path("pulse"), "pulse", .{});
lib.installHeadersDirectory(b.path("sndio"), ".", .{});
lib.installHeadersDirectory(b.path("spa"), "spa", .{});

b.installArtifact(lib);
}

fn installHeadersDirectoryExcludeLicenseFiles(
lib: *std.Build.Step.Compile,
src_dir_path: []const u8,
dest_rel_path: []const u8,
) void {
lib.installHeadersDirectoryOptions(.{
.source_dir = .{ .path = src_dir_path },
.install_dir = .header,
.install_subdir = dest_rel_path,
.exclude_extensions = &.{ "COPYING", "LICENSE" },
});
}

0 comments on commit c97923f

Please sign in to comment.