mach/libs/trimesh2d/build.zig
Stephen Gutekanst 9df6448109 trimesh2d: add library for simple polygon triangulation in linear time
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-18 13:42:38 -07:00

25 lines
633 B
Zig

const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions();
const lib = b.addStaticLibrary("trimesh2d", "src/main.zig");
lib.setBuildMode(mode);
lib.install();
var main_tests = b.addTest("src/main.zig");
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
_ = pkg;
}
pub const pkg = std.build.Pkg{
.name = "trimesh2d",
.source = .{ .path = thisDir() ++ "/src/main.zig" },
};
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}