build: change example to examples/text_input

Will add more example runs later
This commit is contained in:
Tim Culverhouse 2024-04-10 14:40:22 -05:00
parent d3f22e7612
commit 40f80bef0c

View file

@ -30,19 +30,19 @@ pub fn build(b: *std.Build) void {
vaxis_mod.addImport("gap_buffer", gap_buffer_dep.module("gap_buffer")); vaxis_mod.addImport("gap_buffer", gap_buffer_dep.module("gap_buffer"));
// Examples // Examples
const example_step = b.step("example", "Run examples"); const text_input_step = b.step("examples/text_input", "Run text_input.zig");
const example = b.addExecutable(.{ const text_input = b.addExecutable(.{
.name = "vaxis_pathological_example", .name = "text_input",
// Change this to the example you want to use! // Change this to the example you want to use!
.root_source_file = std.Build.LazyPath.relative("examples/text_input.zig"), .root_source_file = std.Build.LazyPath.relative("examples/text_input.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
example.root_module.addImport("vaxis", vaxis_mod); text_input.root_module.addImport("vaxis", vaxis_mod);
const example_run = b.addRunArtifact(example); const text_input_run = b.addRunArtifact(text_input);
example_step.dependOn(&example_run.step); text_input_step.dependOn(&text_input_run.step);
// Tests // Tests
const tests_step = b.step("test", "Run tests"); const tests_step = b.step("test", "Run tests");