webui/build.zig
2023-03-19 11:58:22 -06:00

26 lines
589 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const lib = b.addStaticLibrary(.{
.name = "webui",
.target = target,
.optimize = optimize,
});
lib.addCSourceFiles(&.{
"src/webui.c",
"src/mongoose.c",
}, &.{""});
lib.linkLibC();
lib.addIncludePath("include");
lib.installHeadersDirectory("include", "");
lib.install();
if (target.isWindows()) {
lib.linkSystemLibrary("Ws2_32");
}
}