2022-07-18 15:21:01 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
2023-07-03 22:08:56 +02:00
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
|
2023-04-27 07:58:13 +02:00
|
|
|
_ = b.addModule("zig-glib-log", .{
|
|
|
|
.source_file = .{ .path = "src/main.zig" },
|
2023-02-06 13:47:22 +01:00
|
|
|
});
|
2023-07-03 22:08:56 +02:00
|
|
|
|
|
|
|
const test_exe = b.addTest(.{
|
|
|
|
.root_source_file = .{ .path = "src/main.zig" },
|
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
|
|
|
test_exe.linkLibC();
|
|
|
|
test_exe.linkSystemLibrary("glib-2.0");
|
|
|
|
|
|
|
|
const test_step = b.step("test", "run tests");
|
|
|
|
test_step.dependOn(&b.addRunArtifact(test_exe).step);
|
2022-07-18 15:21:01 +02:00
|
|
|
}
|