struct RcSourceFile [src]
Fields
file: LazyPath
flags: []const []const u8 = &.{}Any option that rc.exe accepts will work here, with the exception of:
/fo: The output filename is set by the build system
/p: Only running the preprocessor is not supported in this context
/:no-preprocess (non-standard option): Not supported in this context
Any MUI-related option
https://learn.microsoft.com/en-us/windows/win32/menurc/using-rc-the-rc-command-line-
Implicitly defined options:
/x (ignore the INCLUDE environment variable)
/D_DEBUG or /DNDEBUG depending on the optimization mode
include_paths: []const LazyPath = &.{}Include paths that may or may not exist yet and therefore need to be
specified as a LazyPath. Each path will be appended to the flags
as /I .
Members
- dupe (Function)
Source
pub const RcSourceFile = struct {
file: LazyPath,
/// Any option that rc.exe accepts will work here, with the exception of:
/// - `/fo`: The output filename is set by the build system
/// - `/p`: Only running the preprocessor is not supported in this context
/// - `/:no-preprocess` (non-standard option): Not supported in this context
/// - Any MUI-related option
/// https://learn.microsoft.com/en-us/windows/win32/menurc/using-rc-the-rc-command-line-
///
/// Implicitly defined options:
/// /x (ignore the INCLUDE environment variable)
/// /D_DEBUG or /DNDEBUG depending on the optimization mode
flags: []const []const u8 = &.{},
/// Include paths that may or may not exist yet and therefore need to be
/// specified as a LazyPath. Each path will be appended to the flags
/// as `/I `.
include_paths: []const LazyPath = &.{},
pub fn dupe(file: RcSourceFile, b: *std.Build) RcSourceFile {
const include_paths = b.allocator.alloc(LazyPath, file.include_paths.len) catch @panic("OOM");
for (include_paths, file.include_paths) |*dest, lazy_path| dest.* = lazy_path.dupe(b);
return .{
.file = file.file.dupe(b),
.flags = b.dupeStrings(file.flags),
.include_paths = include_paths,
};
}
}