build: link CoreFoundation and IOKit frameworks on macOS

This commit is contained in:
utox39 committed 2025-03-03 01:09:03 +01:00
1 parent 232fa771cd
commit 6adf8effcb
1 file changed
+5
+5
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`).