2023-08-08 23:47:01 -06:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
|
|
|
|
const main_tests = b.addTest(.{
|
|
|
|
.root_source_file = .{ .path = "src/main.zig" },
|
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
|
|
|
const run_main_tests = b.addRunArtifact(main_tests);
|
|
|
|
|
|
|
|
const test_step = b.step("test", "Run library tests");
|
|
|
|
test_step.dependOn(&run_main_tests.step);
|
|
|
|
|
2024-02-07 01:46:49 -07:00
|
|
|
const exe = b.addExecutable(.{
|
|
|
|
.name = "pinephone-test",
|
|
|
|
.root_source_file = .{ .path = "src/main.zig" },
|
2023-12-18 12:01:28 -07:00
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
2024-02-07 01:46:49 -07:00
|
|
|
exe.addIncludePath(.{ .path = "deps/font8x8/" });
|
2024-01-30 14:12:50 -07:00
|
|
|
|
2024-02-16 17:58:42 -07:00
|
|
|
const mach_freetype_dep = b.dependency("mach_freetype", .{
|
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
exe.root_module.addImport("freetype", mach_freetype_dep.module("mach-freetype"));
|
|
|
|
exe.root_module.addImport("harfbuzz", mach_freetype_dep.module("mach-harfbuzz"));
|
|
|
|
|
|
|
|
const font_assets_dep = b.dependency("font_assets", .{});
|
|
|
|
exe.root_module.addImport("font-assets", font_assets_dep.module("font-assets"));
|
|
|
|
|
2024-02-07 01:46:49 -07:00
|
|
|
b.installArtifact(exe);
|
2023-08-08 23:47:01 -06:00
|
|
|
}
|