27 lines
780 B
Zig
27 lines
780 B
Zig
const std = @import("std");
|
|
const bh = @import("bh");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const opts = bh.declareOptions(b);
|
|
|
|
const mod = b.addModule("objLoader", .{
|
|
.target = opts.target,
|
|
.optimize = opts.optimize,
|
|
.root_source_file = b.path("src/obj_loader.zig"),
|
|
});
|
|
|
|
const test_step = b.step("test", "");
|
|
const tests = b.addTest(.{
|
|
.root_module = b.createModule(.{
|
|
.target = opts.target,
|
|
.optimize = opts.optimize,
|
|
.root_source_file = b.path("src/obj_loader.zig"),
|
|
.link_libc = true,
|
|
}),
|
|
});
|
|
|
|
tests.root_module.addImport("objLoader", mod);
|
|
const runArtifact = b.addRunArtifact(tests);
|
|
test_step.dependOn(&runArtifact.step);
|
|
}
|