Files
ZWindow/build.zig
T
2026-11-22 19:23:52 +01:00

32 lines
866 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const translate_c = b.addTranslateC(.{
.root_source_file = b.path("src/c.h"),
.target = target,
.optimize = optimize,
});
translate_c.linkSystemLibrary("X11", .{});
translate_c.linkSystemLibrary("Xi", .{});
translate_c.linkSystemLibrary("XFixes", .{});
translate_c.linkSystemLibrary("Xext", .{});
const window = b.addModule("root", .{
.root_source_file = b.path("src/Window.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{
.name = "c",
.module = translate_c.createModule(),
},
},
.link_libc = false,
});
_ = window;
}