Skip to content

Commit

Permalink
update to latest Zig API
Browse files Browse the repository at this point in the history
  • Loading branch information
alichraghi committed Aug 3, 2023
1 parent 16034c0 commit 57d2135
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
lib.linkLibC();
lib.addIncludePath("include");
lib.addIncludePath(.{ .path = "include" });
lib.defineCMacro("FT2_BUILD_LIBRARY", "1");

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

0 comments on commit 57d2135

Please sign in to comment.