Skip to content

Commit

Permalink
Merge pull request #39 from tcoratger/update-zig-master
Browse files Browse the repository at this point in the history
add fix for new zig master
  • Loading branch information
sam701 authored Jan 5, 2024
2 parents 7c6d4a6 + 540e652 commit aa3de8e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});

const module = b.addModule("zig-cli", .{
.source_file = std.Build.FileSource.relative("src/main.zig"),
.root_source_file = std.Build.LazyPath.relative("src/main.zig"),
});

const lib = b.addStaticLibrary(.{
Expand All @@ -26,19 +26,21 @@ pub fn build(b: *std.Build) void {
test_step.dependOn(&run_tests.step);

const simple = b.addExecutable(.{
.target = target,
.name = "simple",
.root_source_file = .{ .path = "examples/simple.zig" },
.optimize = optimize,
});
simple.addModule("zig-cli", module);
simple.root_module.addImport("zig-cli", module);
b.installArtifact(simple);

const short = b.addExecutable(.{
.target = target,
.name = "short",
.root_source_file = .{ .path = "examples/short.zig" },
.optimize = optimize,
});
short.addModule("zig-cli", module);
short.root_module.addImport("zig-cli", module);
b.installArtifact(short);

b.default_step.dependOn(&simple.step);
Expand Down

0 comments on commit aa3de8e

Please sign in to comment.