summaryrefslogtreecommitdiff
path: root/hook/build.zig
diff options
context:
space:
mode:
authorGravatar Matthew Wozniak <me@woz.blue> 2025-08-11 18:17:40 -0400
committerGravatar Matthew Wozniak <me@woz.blue> 2025-08-11 20:46:00 -0400
commit89055b019e2e2d49f8813d3578f6bc338326ca47 (patch)
treecdd097e134454937ccd35324b55d4055c2c2f4ed /hook/build.zig
downloadrt2-89055b019e2e2d49f8813d3578f6bc338326ca47.tar.gz
rt2-89055b019e2e2d49f8813d3578f6bc338326ca47.zip
intial commitHEADmaster
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);
+}