Files
2026-06-18 00:16:01 +02:00

35 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 drm = b.addModule("drm", .{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/drm.zig"),
});
const example = b.addExecutable(.{
.name = "example",
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("example.zig"),
}),
});
example.root_module.addImport("drm", drm);
const run_example = b.addRunArtifact(example);
const example_step = b.step("example", "Run example.");
example_step.dependOn(&run_example.step);
const test_exe = b.addTest(.{ .root_module = drm });
const run_tests = b.addRunArtifact(test_exe);
const test_step = b.step("test", "Run tests.");
test_step.dependOn(&run_tests.step);
const check_obj = b.addObject(.{ .name = "check", .root_module = drm });
const check_step = b.step("check", "ZLS check");
check_step.dependOn(&check_obj.step);
}