zig-lys/build.zig

30 lines
846 B
Zig
Raw Permalink Normal View History

2024-11-23 23:26:03 +00:00
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const libRoot = b.path("src/root.zig");
2024-11-24 20:25:13 +00:00
const module = b.addModule("lys", .{
.root_source_file = libRoot,
.target = target,
.optimize = optimize,
});
2024-11-30 23:50:25 +00:00
const chameleon = b.dependency("chameleon", .{
.target = target,
.optimize = optimize,
});
module.addImport("chameleon", chameleon.module("chameleon"));
2024-11-24 20:25:13 +00:00
2024-11-23 23:26:03 +00:00
const libTests = b.addTest(.{
2026-01-06 05:46:53 +00:00
.root_module = module,
2024-11-23 23:26:03 +00:00
});
2024-12-02 02:50:58 +00:00
libTests.root_module.addImport("chameleon", chameleon.module("chameleon"));
2024-11-23 23:26:03 +00:00
const libTestsRun = b.addRunArtifact(libTests);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&libTestsRun.step);
}