feat(NSPasteboard): added objective c bridge and build changes

This commit is contained in:
Grace Yoder 2026-06-29 09:45:37 -06:00
parent 2f75723e16
commit 565174c4b8
Signed by: grace
SSH key fingerprint: SHA256:oG9v0ZlohsoMAg083HAwBGOcaPLF3nIuOlAW4MtASMo
4 changed files with 48 additions and 0 deletions

View file

@ -23,6 +23,21 @@ pub fn build(b: *std.Build) void {
}),
});
if (target.result.os.tag == .macos) {
exe.root_module.addCSourceFiles(.{
.files = &.{"src/Clip/NSPBBridge.m"},
.language = .objective_c,
.flags = &.{"-fobjc-arc"},
});
exe.root_module.linkFramework("Cocoa", .{});
tests.root_module.addCSourceFiles(.{
.files = &.{"src/Clip/NSPBBridge.m"},
.language = .objective_c,
.flags = &.{"-fobjc-arc"},
});
tests.root_module.linkFramework("Cocoa", .{});
}
const test_step = b.step("test", "Run tests");
const run_tests = b.addRunArtifact(tests);
test_step.dependOn(&run_tests.step);