Function installHeader [src]
Marks the specified header for installation alongside this artifact.
When a module links with this artifact, all headers marked for installation are added to that
module's include search path.
Prototype
pub fn installHeader(cs: *Compile, source: LazyPath, dest_rel_path: []const u8) void
Parameters
cs: *Compile
source: LazyPath
dest_rel_path: []const u8
Source
pub fn installHeader(cs: *Compile, source: LazyPath, dest_rel_path: []const u8) void {
const b = cs.step.owner;
const installation: HeaderInstallation = .{ .file = .{
.source = source.dupe(b),
.dest_rel_path = b.dupePath(dest_rel_path),
} };
cs.installed_headers.append(installation) catch @panic("OOM");
cs.addHeaderInstallationToIncludeTree(installation);
installation.getSource().addStepDependencies(&cs.step);
}