summaryrefslogtreecommitdiff
path: root/hook/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'hook/build.zig')
-rw-r--r--hook/build.zig21
1 files changed, 21 insertions, 0 deletions
diff --git a/hook/build.zig b/hook/build.zig
new file mode 100644
index 0000000..6e13e7c
--- /dev/null
+++ b/hook/build.zig
@@ -0,0 +1,21 @@
+const std = @import("std");
+
+pub fn build(b: *std.Build) void {
+ const target = b.standardTargetOptions(.{});
+ const optimize = b.standardOptimizeOption(.{});
+
+ const mod = b.addModule("hook", .{
+ .root_source_file = b.path("src/zhook.zig"),
+ .target = target,
+ .optimize = optimize,
+ });
+ if (target.result.os.tag == .windows)
+ mod.linkSystemLibrary("kernel32", .{});
+
+ const mod_tests = b.addTest(.{
+ .root_module = mod,
+ });
+ const run_mod_tests = b.addRunArtifact(mod_tests);
+ const test_step = b.step("test", "Run tests");
+ test_step.dependOn(&run_mod_tests.step);
+}