add(examples/layout): mixed content with different layout options

This commit is contained in:
2025-02-21 12:19:16 +01:00
parent 9dc1a4b95a
commit cc847b7035
3 changed files with 124 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ pub fn build(b: *std.Build) void {
vertical,
horizontal,
grid,
mixed,
// styles:
};
@@ -78,6 +79,14 @@ pub fn build(b: *std.Build) void {
});
grid.root_module.addImport("zterm", lib);
const mixed = b.addExecutable(.{
.name = "mixed",
.root_source_file = b.path("examples/layouts/mixed.zig"),
.target = target,
.optimize = optimize,
});
mixed.root_module.addImport("zterm", lib);
// mapping of user selected example to compile step
const exe = switch (example) {
// elements:
@@ -87,6 +96,7 @@ pub fn build(b: *std.Build) void {
.vertical => vertical,
.horizontal => horizontal,
.grid => grid,
.mixed => mixed,
// styles:
};
b.installArtifact(exe);