Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839const std = @import("std");
pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{});
const zmath = b.dependency("zmath", .{});
const mod = b.addModule("codings", .{ .root_source_file = b.path("src/root.zig"), .target = target, .optimize = optimize, }); mod.addImport("zmath", zmath.module("root"));
const lib = b.addLibrary(.{ .name = "codings", .linkage = .static, .root_module = mod, }); b.installArtifact(lib);
const install_docs = b.addInstallDirectory(.{ .source_dir = lib.getEmittedDocs(), .install_dir = .prefix, .install_subdir = "docs", });
const doc_step = b.step("docs", "Copy documentation to prefix path"); doc_step.dependOn(&install_docs.step);
const mod_tests = b.addTest(.{ .root_module = mod, }); const run_mod_tests = b.addRunArtifact(mod_tests); const test_step = b.step("test", "Run tests"); test_step.dependOn(&run_mod_tests.step);}