From 7614eea30eb790d878bba90e11540c63fa871320 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 20 Feb 2026 19:11:28 +0100 Subject: [PATCH] refactor: add an FSEvents based watcher for macos --- build.zig | 6 ++++++ build.zig.zon | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/build.zig b/build.zig index c6469fc..0ef3176 100644 --- a/build.zig +++ b/build.zig @@ -734,6 +734,12 @@ pub fn build_exe( exe.root_module.addImport("version", b.createModule(.{ .root_source_file = version_file })); exe.root_module.addImport("version_info", b.createModule(.{ .root_source_file = version_info_file })); + if (target.result.os.tag == .macos) { + exe.addFrameworkPath(b.dependency("xcode-frameworks", .{}).path("Frameworks")); + exe.linkFramework("CoreServices"); + exe.linkFramework("CoreFoundation"); + } + if (target.result.os.tag == .windows) { exe.addWin32ResourceFile(.{ .file = b.path("src/win32/flow.rc"), diff --git a/build.zig.zon b/build.zig.zon index bd7db6a..ba03729 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -46,6 +46,10 @@ .url = "git+https://github.com/ziglibs/diffz.git#fbdf690b87db6b1142bbce6d4906f90b09ce60bb", .hash = "diffz-0.0.1-G2tlIezMAQBwGNGDs7Hn_N25dWSjEzgR_FAx9GFAvCuZ", }, + .@"xcode-frameworks" = .{ + .url = "git+https://github.com/hexops/xcode-frameworks?ref=main#8a1cfb373587ea4c9bb1468b7c986462d8d4e10e", + .hash = "N-V-__8AALShqgXkvqYU6f__FrA22SMWmi2TXCJjNTO1m8XJ", + }, }, .paths = .{ "include",