const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const mod = b.addModule("stb_image", .{ .target = target, .optimize = optimize, .root_source_file = b.path("src/root.zig"), }); const stb_dependency = b.dependency("stb", .{}); mod.addIncludePath(stb_dependency.path(".")); mod.addCSourceFile(.{ .file = b.path("src/stb_image_impl.c"), .flags = &.{} }); const lib = b.addLibrary(.{ .name = "stb_image", .root_module = mod }); b.installArtifact(lib); { const tests = b.addTest(.{ .root_module = mod }); const run_tests = b.addRunArtifact(tests); const test_step = b.step("test", "Run tests"); test_step.dependOn(&run_tests.step); } }