trimesh2d: add library for simple polygon triangulation in linear time
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d7d0aa116c
commit
9df6448109
11 changed files with 553 additions and 0 deletions
25
libs/trimesh2d/build.zig
Normal file
25
libs/trimesh2d/build.zig
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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 ".";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue