game-2026-01-30/libs/stb/build.zig
2026-01-30 23:28:18 +02:00

54 lines
1.5 KiB
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const stb_dependency = b.dependency("stb", .{});
{
const mod_stb_image = b.addModule("stb_image", .{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/stb_image.zig"),
.link_libc = true,
});
mod_stb_image.addIncludePath(stb_dependency.path("."));
mod_stb_image.addCSourceFile(.{
.file = b.path("src/stb_image_impl.c"),
.flags = &.{}
});
}
{
const mod_stb_image = b.addModule("stb_vorbis", .{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/stb_vorbis.zig"),
.link_libc = true,
});
mod_stb_image.addIncludePath(stb_dependency.path("."));
mod_stb_image.addCSourceFile(.{
.file = b.path("src/stb_vorbis_impl.c"),
.flags = &.{}
});
}
{
const mod_stb_rect_pack = b.addModule("stb_rect_pack", .{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/stb_rect_pack.zig"),
.link_libc = true,
});
mod_stb_rect_pack.addIncludePath(stb_dependency.path("."));
mod_stb_rect_pack.addCSourceFile(.{
.file = b.path("src/stb_rect_pack_impl.c"),
.flags = &.{}
});
}
}