chore: port to new zig build API
This commit is contained in:
parent
1db0367ce6
commit
aaea1cd24e
20
build.zig
20
build.zig
|
@ -1,23 +1,7 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn build(b: *std.build.Builder) void {
|
pub fn build(b: *std.build.Builder) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
_ = b.addModule("zig-glib-log", .{
|
||||||
const mode = b.standardOptimizeOption(.{});
|
.source_file = .{ .path = "src/main.zig" },
|
||||||
|
|
||||||
b.addModule(.{
|
|
||||||
.name = "zig-glib-log",
|
|
||||||
.root_source_file = .{ .path = "src/main.zig" },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const lib = b.addStaticLibrary(.{
|
|
||||||
.name = "zig-glib-log",
|
|
||||||
.root_source_file = .{ .path = "src/main.zig" },
|
|
||||||
.target = target,
|
|
||||||
.optimize = mode,
|
|
||||||
});
|
|
||||||
|
|
||||||
lib.linkLibC();
|
|
||||||
lib.linkSystemLibrary("glib-2.0");
|
|
||||||
|
|
||||||
lib.install();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue