mod(build): adjust name of enum values to be easier to type in command line
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
This commit is contained in:
14
build.zig
14
build.zig
@@ -5,12 +5,12 @@ pub fn build(b: *std.Build) void {
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const Examples = enum {
|
||||
Input,
|
||||
Layout,
|
||||
Scrollable,
|
||||
input,
|
||||
layout,
|
||||
scrollable,
|
||||
};
|
||||
|
||||
const example = b.option(Examples, "example", "Example to build and/or run.") orelse .Layout;
|
||||
const example = b.option(Examples, "example", "Example to build and/or run. (default: layout)") orelse .layout;
|
||||
|
||||
const options = b.addOptions();
|
||||
options.addOption(Examples, "example", example);
|
||||
@@ -58,9 +58,9 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
// mapping of user selected example to compile step
|
||||
const exe = switch (example) {
|
||||
.Input => input,
|
||||
.Layout => layout,
|
||||
.Scrollable => scrollable,
|
||||
.input => input,
|
||||
.layout => layout,
|
||||
.scrollable => scrollable,
|
||||
};
|
||||
b.installArtifact(exe);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user