aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGrace Yoder <grace_yoder@outlook.com>2026-06-30 14:11:34 -0600
committerGrace Yoder <grace_yoder@outlook.com>2026-07-01 18:05:31 -0600
commit1be3e0468dfbb6cb2b786864b02051ee59188ed9 (patch)
treeac83f7fbf981b9c3cb4d1e5ff8c43960319726a6 /build.zig
parent63265d1d7e36c4150df3bdc00bfda2391a54b916 (diff)
build: updated pipelines to use cargo-zigbuild container to work with apple and be faster
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 59c2f26..76e2321 100644
--- a/build.zig
+++ b/build.zig
@@ -29,12 +29,20 @@ pub fn build(b: *std.Build) void {
.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"},
});
+ if (b.sysroot) |sysroot| {
+ const framework_path = b.pathJoin(&.{ sysroot, "System/Library/Frameworks" });
+ const include_path = b.pathJoin(&.{ sysroot, "usr/include" });
+ exe.root_module.addSystemFrameworkPath(.{ .cwd_relative = framework_path });
+ exe.root_module.addSystemIncludePath(.{ .cwd_relative = include_path });
+ tests.root_module.addSystemFrameworkPath(.{ .cwd_relative = framework_path });
+ tests.root_module.addSystemIncludePath(.{ .cwd_relative = include_path });
+ }
+ exe.root_module.linkFramework("Cocoa", .{});
tests.root_module.linkFramework("Cocoa", .{});
}