Skip to content

Commit 37424fd

Browse files
committed
add std.build.LibExeObjStep.installHeadersDirectoryOptions
For when you need options such as excluding certain extensions.
1 parent e45b471 commit 37424fd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/std/build/LibExeObjStep.zig

+8-1
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,18 @@ pub fn installHeadersDirectory(
486486
src_dir_path: []const u8,
487487
dest_rel_path: []const u8,
488488
) void {
489-
const install_dir = a.builder.addInstallDirectory(.{
489+
return a.builder.addInstallDirectoryOptions(.{
490490
.source_dir = src_dir_path,
491491
.install_dir = .header,
492492
.install_subdir = dest_rel_path,
493493
});
494+
}
495+
496+
pub fn installHeadersDirectoryOptions(
497+
a: *LibExeObjStep,
498+
options: std.build.InstallDirStep.Options,
499+
) void {
500+
const install_dir = a.builder.addInstallDirectory(options);
494501
a.builder.getInstallStep().dependOn(&install_dir.step);
495502
a.installed_headers.append(&install_dir.step) catch unreachable;
496503
}

0 commit comments

Comments
 (0)