Skip to content

Commit

Permalink
update sokol dependency and minor build.zig cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Apr 20, 2024
1 parent 9f56aaa commit 5544dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn addKC85(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode, dep_
.name = name,
.target = target,
.optimize = optimize,
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
});
kc85.root_module.addOptions("build_options", options);
kc85.root_module.addImport("sokol", dep_sokol.module("sokol"));
Expand All @@ -61,7 +61,7 @@ fn addKC85(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode, dep_
.name = name,
.target = target,
.optimize = optimize,
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
});
kc85.root_module.addOptions("build_options", options);
kc85.root_module.addImport("sokol", dep_sokol.module("sokol"));
Expand Down Expand Up @@ -91,7 +91,7 @@ fn addKC85(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode, dep_

fn addTests(b: *Build) void {
const tests_exe = b.addTest(.{
.root_source_file = .{ .path = "src/tests.zig" },
.root_source_file = b.path("src/tests.zig"),
});
const run = b.addRunArtifact(tests_exe);
b.step("tests", "Run all tests").dependOn(&run.step);
Expand All @@ -102,7 +102,7 @@ fn addZ80Test(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode) v
.name = "z80test",
.target = target,
.optimize = optimize,
.root_source_file = .{ .path = "src/z80test.zig" },
.root_source_file = b.path("src/z80test.zig"),
});
b.installArtifact(exe);
const run = b.addRunArtifact(exe);
Expand All @@ -118,7 +118,7 @@ fn addZ80ZEXDOC(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode)
.name = "z80zexdoc",
.target = target,
.optimize = optimize,
.root_source_file = .{ .path = "src/z80zex.zig" },
.root_source_file = b.path("src/z80zex.zig"),
});
const options = b.addOptions();
exe.root_module.addOptions("build_options", options);
Expand All @@ -139,7 +139,7 @@ fn addZ80ZEXALL(b: *Build, target: Build.ResolvedTarget, optimize: OptimizeMode)
.name = "z80zexall",
.target = target,
.optimize = optimize,
.root_source_file = .{ .path = "src/z80zex.zig" },
.root_source_file = b.path("src/z80zex.zig"),
});
const options = b.addOptions();
exe.root_module.addOptions("build_options", options);
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
.dependencies = .{
.sokol = .{
.url = "git+https://github.com/floooh/sokol-zig.git#c6cfd374448d1b05eae90f88ba5f40e5af64fbb1",
.hash = "1220c40014342de51e09f0b7e7a3089e5701891422a0a5d9fe10334991ca01f47117",
.url = "git+https://github.com/floooh/sokol-zig.git#a9860f4b2962c7522ea5babb22a8f0cefa24348f",
.hash = "1220f60ad2131ae835289a0521b8c252ae3f8229dfac20b9803a498202ca4a1fdedc",
},
},
}

0 comments on commit 5544dbc

Please sign in to comment.