build: link CoreFoundation and IOKit frameworks on macOS

This commit is contained in:
utox39
2025-03-03 01:09:03 +01:00
parent 232fa771cd
commit 6adf8effcb

View File

@@ -36,6 +36,11 @@ pub fn build(b: *std.Build) void {
.optimize = optimize, .optimize = optimize,
}); });
if (target.result.os.tag == .macos) {
exe.linkFramework("CoreFoundation");
exe.linkFramework("IOKit");
}
// This declares intent for the executable to be installed into the // This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default // standard location when the user invokes the "install" step (the default
// step when running `zig build`). // step when running `zig build`).