| ... | ... | @@ -10,10 +10,11 @@ pub fn build(b: *std.build.Builder) void { |
| 10 | 10 | const with_arch_os = b.fmt("-{s}-{s}", .{ @tagName(target.cpu_arch orelse builtin.cpu.arch), @tagName(target.os_tag orelse builtin.os.tag) }); |
| 11 | 11 | const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" }); |
| 12 | 12 | const exe = b.addExecutable(.{ .name = exe_name, .root_source_file = .{ .path = "src/main.zig" }, .target = target, .optimize = mode }); |
| 13 | const tag = b.option(string, "tag", "") orelse "dev"; |
| 13 | 14 | |
| 14 | 15 | const exe_options = b.addOptions(); |
| 15 | 16 | exe.addOptions("build_options", exe_options); |
| 16 | | exe_options.addOption(string, "version", b.option(string, "tag", "") orelse "dev"); |
| 17 | exe_options.addOption(string, "version", tag); |
| 17 | 18 | |
| 18 | 19 | deps.addAllTo(exe); |
| 19 | 20 | b.installArtifact(exe); |