chore: update to new zig module system
parent
e3aa0a9533
commit
1db0367ce6
@ -1,21 +1,23 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
const lib = b.addStaticLibrary("zig-glib-log", "src/main.zig");
|
||||
lib.setBuildMode(mode);
|
||||
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();
|
||||
|
||||
const main_tests = b.addTest("src/main.zig");
|
||||
main_tests.setBuildMode(mode);
|
||||
|
||||
const test_step = b.step("test", "Run library tests");
|
||||
test_step.dependOn(&main_tests.step);
|
||||
}
|
||||
|
Loading…
Reference in New Issue