prefix: voidlib: voidbin: voidheader: voidcustom: []const u8A path relative to the prefix
pub fn dupe(dir: InstallDir, builder: *Build) InstallDirDuplicates the install directory including the path if set to custom.
dir: InstallDirbuilder: *Buildpub fn dupe(dir: InstallDir, builder: *Build) InstallDir {
if (dir == .custom) {
return .{ .custom = builder.dupe(dir.custom) };
} else {
return dir;
}
}pub const InstallDir = union(enum) {
prefix: void,
lib: void,
bin: void,
header: void,
/// A path relative to the prefix
custom: []const u8,
/// Duplicates the install directory including the path if set to custom.
pub fn dupe(dir: InstallDir, builder: *Build) InstallDir {
if (dir == .custom) {
return .{ .custom = builder.dupe(dir.custom) };
} else {
return dir;
}
}
}