remove freetype-gl

This commit is contained in:
Mitchell Hashimoto
2022-04-16 21:18:47 -07:00
parent 74e04355a0
commit d1173626ad
3 changed files with 0 additions and 77 deletions

View File

@ -1,72 +0,0 @@
const std = @import("std");
const ft = @import("../freetype/build.zig");
/// Compile-time options for the library. These mostly correspond to
/// options exposed by the native build system used by the library.
pub const Options = struct {};
/// Create this library. This is the primary API users of build.zig should
/// use to link this library to their application. On the resulting Library,
/// call the link function and given your own application step.
pub fn link(
exe: *std.build.LibExeObjStep,
b: *std.build.Builder,
target: std.zig.CrossTarget,
mode: std.builtin.Mode,
opts: Options,
) !void {
_ = opts;
const ret = b.addStaticLibrary("freetype-gl", null);
ret.setTarget(target);
ret.setBuildMode(mode);
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
try flags.appendSlice(&.{
"-std=c99",
"-O0",
"-DGL_WITH_GLAD",
});
// C files
ret.addCSourceFiles(srcs, flags.items);
ret.addIncludeDir(root());
ret.addIncludeDir(thisDir() ++ "../../vendor/glad/include");
ret.linkLibC();
// For config.h
ret.addIncludeDir(thisDir());
// Dependencies
const ftstep = try ft.create(b, target, mode, .{});
ftstep.addIncludeDirs(ret);
exe.addIncludeDir(root());
exe.linkLibrary(ret);
}
fn root() []const u8 {
return (std.fs.path.dirname(@src().file) orelse unreachable) ++ "/../../vendor/freetype-gl/";
}
fn thisDir() []const u8 {
return (std.fs.path.dirname(@src().file) orelse unreachable) ++ "/";
}
const srcs = &.{
root() ++ "distance-field.c",
root() ++ "edtaa3func.c",
root() ++ "platform.c",
root() ++ "text-buffer.c",
root() ++ "texture-atlas.c",
root() ++ "texture-font.c",
root() ++ "utf8-utils.c",
root() ++ "ftgl-utils.c",
root() ++ "vector.c",
root() ++ "vertex-attribute.c",
// optional stuff we don't need
// root() ++ "font-manager.c",
// root() ++ "vertex-buffer.c",
};

View File

@ -1,4 +0,0 @@
pub usingnamespace @cImport({
@cInclude("texture-atlas.h");
@cInclude("texture-font.h");
});

View File

@ -1 +0,0 @@
// Purposely empty! This is just here so that freetype-gl will build.