Skip to content

Commit

Permalink
cleanup / update to latest Zig
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Sep 17, 2023
1 parent c26ddcb commit 371d90b
Showing 1 changed file with 42 additions and 55 deletions.
97 changes: 42 additions & 55 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -38,60 +38,47 @@ pub fn build(b: *std.Build) void {
b.installArtifact(lib);
}

pub fn addPaths(step: *std.build.CompileStep) void {
step.addIncludePath(.{ .path = sdkPath("/include/freetype") });
step.addIncludePath(.{ .path = sdkPath("/include") });
}

fn sdkPath(comptime suffix: []const u8) []const u8 {
if (suffix[0] != '/') @compileError("suffix must be an absolute path");
return comptime blk: {
const root_dir = std.fs.path.dirname(@src().file) orelse ".";
break :blk root_dir ++ suffix;
};
}

const sources = [_][]const u8{
sdkPath("/src/autofit/autofit.c"),
sdkPath("/src/base/ftbase.c"),
sdkPath("/src/base/ftsystem.c"),
sdkPath("/src/base/ftdebug.c"),
sdkPath("/src/base/ftbbox.c"),
sdkPath("/src/base/ftbdf.c"),
sdkPath("/src/base/ftbitmap.c"),
sdkPath("/src/base/ftcid.c"),
sdkPath("/src/base/ftfstype.c"),
sdkPath("/src/base/ftgasp.c"),
sdkPath("/src/base/ftglyph.c"),
sdkPath("/src/base/ftgxval.c"),
sdkPath("/src/base/ftinit.c"),
sdkPath("/src/base/ftmm.c"),
sdkPath("/src/base/ftotval.c"),
sdkPath("/src/base/ftpatent.c"),
sdkPath("/src/base/ftpfr.c"),
sdkPath("/src/base/ftstroke.c"),
sdkPath("/src/base/ftsynth.c"),
sdkPath("/src/base/fttype1.c"),
sdkPath("/src/base/ftwinfnt.c"),
sdkPath("/src/bdf/bdf.c"),
sdkPath("/src/bzip2/ftbzip2.c"),
sdkPath("/src/cache/ftcache.c"),
sdkPath("/src/cff/cff.c"),
sdkPath("/src/cid/type1cid.c"),
sdkPath("/src/gzip/ftgzip.c"),
sdkPath("/src/lzw/ftlzw.c"),
sdkPath("/src/pcf/pcf.c"),
sdkPath("/src/pfr/pfr.c"),
sdkPath("/src/psaux/psaux.c"),
sdkPath("/src/pshinter/pshinter.c"),
sdkPath("/src/psnames/psnames.c"),
sdkPath("/src/raster/raster.c"),
sdkPath("/src/sdf/sdf.c"),
sdkPath("/src/sfnt/sfnt.c"),
sdkPath("/src/smooth/smooth.c"),
sdkPath("/src/svg/svg.c"),
sdkPath("/src/truetype/truetype.c"),
sdkPath("/src/type1/type1.c"),
sdkPath("/src/type42/type42.c"),
sdkPath("/src/winfonts/winfnt.c"),
"src/autofit/autofit.c",
"src/base/ftbase.c",
"src/base/ftsystem.c",
"src/base/ftdebug.c",
"src/base/ftbbox.c",
"src/base/ftbdf.c",
"src/base/ftbitmap.c",
"src/base/ftcid.c",
"src/base/ftfstype.c",
"src/base/ftgasp.c",
"src/base/ftglyph.c",
"src/base/ftgxval.c",
"src/base/ftinit.c",
"src/base/ftmm.c",
"src/base/ftotval.c",
"src/base/ftpatent.c",
"src/base/ftpfr.c",
"src/base/ftstroke.c",
"src/base/ftsynth.c",
"src/base/fttype1.c",
"src/base/ftwinfnt.c",
"src/bdf/bdf.c",
"src/bzip2/ftbzip2.c",
"src/cache/ftcache.c",
"src/cff/cff.c",
"src/cid/type1cid.c",
"src/gzip/ftgzip.c",
"src/lzw/ftlzw.c",
"src/pcf/pcf.c",
"src/pfr/pfr.c",
"src/psaux/psaux.c",
"src/pshinter/pshinter.c",
"src/psnames/psnames.c",
"src/raster/raster.c",
"src/sdf/sdf.c",
"src/sfnt/sfnt.c",
"src/smooth/smooth.c",
"src/svg/svg.c",
"src/truetype/truetype.c",
"src/type1/type1.c",
"src/type42/type42.c",
"src/winfonts/winfnt.c",
};

0 comments on commit 371d90b

Please sign in to comment.