summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index c168407..6b62524 100644
--- a/build.zig
+++ b/build.zig
@@ -305,12 +305,14 @@ pub fn build(b: *std.Build) void {
// an object explicitly, because then the caller has said which one they want.
const cols = b.option(u16, "cols", "board grid width in cells; rebuilds pardes's object");
const rows = b.option(u16, "rows", "board grid height in cells; rebuilds pardes's object");
- if ((cols != null or rows != null) and b.user_input_options.get("pardes-obj") == null) {
+ const theme_anim = b.option(bool, "theme-animation", "fade chrome colors across a theme change; rebuilds pardes's object (default off on this transport)");
+ if ((cols != null or rows != null or theme_anim != null) and b.user_input_options.get("pardes-obj") == null) {
const editor_dir = std.fs.path.dirname(std.fs.path.dirname(obj) orelse ".") orelse "..";
const build_editor = b.addSystemCommand(&.{ b.graph.zig_exe, "build", "-Dplatform=p4" });
build_editor.setCwd(.{ .cwd_relative = editor_dir });
if (cols) |c| build_editor.addArg(b.fmt("-Dp4-cols={d}", .{c}));
if (rows) |v| build_editor.addArg(b.fmt("-Dp4-rows={d}", .{v}));
+ if (theme_anim) |a| build_editor.addArg(b.fmt("-Dtheme-animation={}", .{a}));
// Its output is a file this build then links, and the linker has no idea it is generated,
// so the ordering has to be said out loud.
build_editor.has_side_effects = true;