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 f552a77 commit e8c5b37
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ subprojects/*

# Zig
/zig-*
.zig-cache
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
lib.linkLibC();
lib.addIncludePath(.{ .path = "include" });
lib.addIncludePath(b.path("include"));
lib.defineCMacro("FT2_BUILD_LIBRARY", "1");

if (use_system_zlib) {
Expand All @@ -31,11 +31,11 @@ pub fn build(b: *std.Build) void {
lib.defineCMacro("HAVE_UNISTD_H", "1");
lib.addCSourceFiles(.{ .files = &sources, .flags = &.{} });
if (target.result.os.tag == .macos) lib.addCSourceFile(.{
.file = .{ .path = "src/base/ftmac.c" },
.file = b.path("src/base/ftmac.c"),
.flags = &.{},
});
lib.installHeadersDirectory("include/freetype", "freetype");
lib.installHeader("include/ft2build.h", "ft2build.h");
lib.installHeadersDirectory(b.path("include/freetype"), "freetype", .{});
lib.installHeader(b.path("include/ft2build.h"), "ft2build.h");
b.installArtifact(lib);
}

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 = .{
.brotli = .{
.url = "https://pkg.machengine.org/brotli/538f4c5b085bb53c84e39860305442abd0436be5.tar.gz",
.hash = "12202a0f156a1d5d25a97468de318a99451a77b930f584d4edeff152259a875a4a75",
.url = "https://pkg.machengine.org/brotli/4c10522a5fa3b4fd7f8beedc8af1e20309719da9.tar.gz",
.hash = "122059777e9e24227733f386b2929a78e15be9b748c99dba0d209744c910671b101c",
.lazy = true,
},
},
Expand Down

0 comments on commit e8c5b37

Please sign in to comment.