this repo has no description
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const target = b.standardTargetOptions(.{});
5 const optimize = b.standardOptimizeOption(.{});
6
7 const zmath = b.dependency("zmath", .{});
8
9 const mod = b.addModule("codings", .{
10 .root_source_file = b.path("src/root.zig"),
11 .target = target,
12 .optimize = optimize,
13 });
14 mod.addImport("zmath", zmath.module("root"));
15
16 const lib = b.addLibrary(.{
17 .name = "codings",
18 .linkage = .static,
19 .root_module = mod,
20 });
21 b.installArtifact(lib);
22
23 const install_docs = b.addInstallDirectory(.{
24 .source_dir = lib.getEmittedDocs(),
25 .install_dir = .prefix,
26 .install_subdir = "docs",
27 });
28
29 const doc_step = b.step("docs", "Copy documentation to prefix path");
30 doc_step.dependOn(&install_docs.step);
31
32 const mod_tests = b.addTest(.{
33 .root_module = mod,
34 });
35 const run_mod_tests = b.addRunArtifact(mod_tests);
36 const test_step = b.step("test", "Run tests");
37 test_step.dependOn(&run_mod_tests.step);
38}