37 lines
1.1 KiB
Zig
37 lines
1.1 KiB
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const getty_dep = b.dependency("getty", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
const getty_mod = getty_dep.module("getty");
|
|
|
|
const getty_msgpack_dep = b.dependency("getty-msgpack", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
const getty_msgpack_mod = getty_msgpack_dep.module("getty-msgpack");
|
|
|
|
_ = b.addModule("nuplugin", .{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.imports = &.{
|
|
.{ .name = "getty", .module = getty_mod },
|
|
.{ .name = "getty-msgpack", .module = getty_msgpack_mod },
|
|
},
|
|
});
|
|
|
|
const unit_tests = b.addTest(.{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
const run_unit_tests = b.addRunArtifact(unit_tests);
|
|
|
|
const test_step = b.step("test", "Run unit tests");
|
|
test_step.dependOn(&run_unit_tests.step);
|
|
}
|