-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.zig
22 lines (18 loc) · 821 Bytes
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const std = @import("std");
pub fn build(b: *std.Build) void {
var zigwin32 = b.dependency("zigwin32", .{});
const zigwin_console = b.addModule("zigwin-console", .{
.root_source_file = b.path("console.zig"),
});
zigwin_console.addImport("zigwin32", zigwin32.module("zigwin32"));
const optimize = b.standardOptimizeOption(.{});
const zigwin_console_test = b.addTest(.{
.root_source_file = b.path("console.zig"),
.target = b.resolveTargetQuery(.{ .os_tag = .windows }),
.optimize = optimize,
});
zigwin_console_test.root_module.addImport("zigwin32", zigwin32.module("zigwin32"));
const run_lib_tests = b.addRunArtifact(zigwin_console_test);
const test_step = b.step("test", "Run the library tests");
test_step.dependOn(&run_lib_tests.step);
}