diff options
| author | Grace Yoder <grace_yoder@outlook.com> | 2026-06-30 14:11:34 -0600 |
|---|---|---|
| committer | Grace Yoder <grace_yoder@outlook.com> | 2026-07-01 18:05:31 -0600 |
| commit | 1be3e0468dfbb6cb2b786864b02051ee59188ed9 (patch) | |
| tree | ac83f7fbf981b9c3cb4d1e5ff8c43960319726a6 /build.zig | |
| parent | 63265d1d7e36c4150df3bdc00bfda2391a54b916 (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.zig | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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", .{}); } |
