Skip to content

Commit

Permalink
update to Zig 2024.05
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Jun 2, 2024
1 parent 0827931 commit 86fc802
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Cheers!
# -andrewrk

zig-cache/
.zig-cache/
zig-out/
/release/
/debug/
Expand Down
12 changes: 7 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@ pub fn build(b: *std.Build) !void {
const use_system_zlib = b.option(bool, "use_system_zlib", "Use system zlib") orelse false;
const enable_brotli = b.option(bool, "enable_brotli", "Build brotli") orelse true;

const freetype_module = b.addModule("mach-freetype", .{ .root_source_file = .{ .path = "src/freetype.zig" } });
const freetype_module = b.addModule("mach-freetype", .{
.root_source_file = b.path("src/freetype.zig"),
});
const harfbuzz_module = b.addModule("mach-harfbuzz", .{
.root_source_file = .{ .path = "src/harfbuzz.zig" },
.root_source_file = b.path("src/harfbuzz.zig"),
.imports = &.{.{ .name = "freetype", .module = freetype_module }},
});

const freetype_tests = b.addTest(.{
.name = "freetype-tests",
.root_source_file = .{ .path = "src/freetype.zig" },
.root_source_file = b.path("src/freetype.zig"),
.target = target,
.optimize = optimize,
});
freetype_tests.root_module.addImport("freetype", freetype_module);

const harfbuzz_tests = b.addTest(.{
.name = "harfbuzz-tests",
.root_source_file = .{ .path = "src/harfbuzz.zig" },
.root_source_file = b.path("src/harfbuzz.zig"),
.target = target,
.optimize = optimize,
});
Expand Down Expand Up @@ -64,7 +66,7 @@ pub fn build(b: *std.Build) !void {
}) |example| {
const example_exe = b.addExecutable(.{
.name = example,
.root_source_file = .{ .path = "examples/" ++ example ++ ".zig" },
.root_source_file = b.path("examples/" ++ example ++ ".zig"),
.target = target,
.optimize = optimize,
});
Expand Down
12 changes: 6 additions & 6 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
},
.dependencies = .{
.freetype = .{
.url = "https://pkg.machengine.org/freetype/ad7313db50a6bd29121d587effb3b308e21a20fd.tar.gz",
.hash = "122016f743edf65f5c0569f7ad06509218688e101c66f2c094d5d9400326945bcb90",
.url = "https://pkg.machengine.org/freetype/e8c5b37f320db03acba410d993441815bc809606.tar.gz",
.hash = "1220babb7939707ca390b934657dfd3c8c3a6a78cc9442e4cbd43e3f9ffd49daec9e",
.lazy = true,
},
.harfbuzz = .{
.url = "https://pkg.machengine.org/harfbuzz/ab0ce2cee88a03fb8a00aca9945ce7623f0544ed.tar.gz",
.hash = "1220d001c200dc5839f1b4302d12a699c7398498980f019671432ef9b0a1c22d85d7",
.url = "https://pkg.machengine.org/harfbuzz/cecd5c8d34d343c0ab8b4dc6d2b0e2c08da52936.tar.gz",
.hash = "1220557b115b730afbece2ff4a073b6dc095d143318ba2f6b258cee13f580dd7e8ba",
.lazy = true,
},
.font_assets = .{
.url = "https://pkg.machengine.org/font-assets/7977df057e855140a207de49039114f1ab8e6c2d.tar.gz",
.hash = "12208106eef051bc730bac17c2d10f7e42ea63b579b919480fec86b7c75a620c75d4",
.url = "https://pkg.machengine.org/font-assets/899f16b815fde126ba8f6fb781e65253f461b7bf.tar.gz",
.hash = "12202b816e7c31c516bd87218fd56f9b1f93671e4ab42a2a98110d586c4b3bdd2730",
.lazy = true,
},
},
Expand Down

0 comments on commit 86fc802

Please sign in to comment.