mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-24 12:46:10 +03:00

- move wuffs code from src/ to pkg/ - eliminate stray debug logs - make logs a warning instead of an error - remove initialization of some structs to zero
31 lines
876 B
Zig
31 lines
876 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const wuffs = b.dependency("wuffs", .{});
|
|
|
|
const module = b.addModule("wuffs", .{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
.link_libc = true,
|
|
});
|
|
|
|
module.addIncludePath(wuffs.path("release/c"));
|
|
module.addCSourceFile(
|
|
.{
|
|
.file = wuffs.path("release/c/wuffs-v0.4.c"),
|
|
.flags = f: {
|
|
const flags = @import("src/defs.zig").build;
|
|
var a: [flags.len][]const u8 = undefined;
|
|
inline for (flags, 0..) |flag, i| {
|
|
a[i] = "-D" ++ flag ++ "=1";
|
|
}
|
|
break :f &a;
|
|
},
|
|
},
|
|
);
|
|
}
|