diff options
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 12 | ||||
| -rw-r--r-- | build.zig.zon | 2 |
2 files changed, 9 insertions, 5 deletions
| @@ -24,12 +24,16 @@ pub fn build(b: *std.Build) void { | |||
| 24 | }) |example_name| { | 24 | }) |example_name| { |
| 25 | const example = b.addExecutable(.{ | 25 | const example = b.addExecutable(.{ |
| 26 | .name = example_name, | 26 | .name = example_name, |
| 27 | .root_source_file = b.path(b.fmt("example/{s}.zig", .{example_name})), | 27 | .root_module = b.createModule(.{ |
| 28 | .target = target, | 28 | .root_source_file = b.path(b.fmt("example/{s}.zig", .{example_name})), |
| 29 | .optimize = optimize, | 29 | .target = target, |
| 30 | .optimize = optimize, | ||
| 31 | .imports = &.{ | ||
| 32 | .{ .name = "clap", .module = clap_mod }, | ||
| 33 | }, | ||
| 34 | }), | ||
| 30 | }); | 35 | }); |
| 31 | const install_example = b.addInstallArtifact(example, .{}); | 36 | const install_example = b.addInstallArtifact(example, .{}); |
| 32 | example.root_module.addImport("clap", clap_mod); | ||
| 33 | example_step.dependOn(&example.step); | 37 | example_step.dependOn(&example.step); |
| 34 | example_step.dependOn(&install_example.step); | 38 | example_step.dependOn(&install_example.step); |
| 35 | } | 39 | } |
diff --git a/build.zig.zon b/build.zig.zon index 0fc81aa..883ed5e 100644 --- a/build.zig.zon +++ b/build.zig.zon | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | .{ | 1 | .{ |
| 2 | .name = .clap, | 2 | .name = .clap, |
| 3 | .version = "0.10.0", | 3 | .version = "0.10.0", |
| 4 | .minimum_zig_version = "0.14.0", | 4 | .minimum_zig_version = "0.15.0-dev.1147+69cf40da6", |
| 5 | .fingerprint = 0x65f99e6f07a316a0, | 5 | .fingerprint = 0x65f99e6f07a316a0, |
| 6 | .paths = .{ | 6 | .paths = .{ |
| 7 | "clap", | 7 | "clap", |