build: make FSEvents backend optional and link it against xcode-frameworks
This commit is contained in:
parent
a720697618
commit
f326b73457
2 changed files with 26 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const build_options = @import("build_options");
|
||||
|
||||
pub const EventType = enum {
|
||||
created,
|
||||
|
|
@ -80,7 +81,7 @@ pub fn handle_read_ready(self: *@This()) !void {
|
|||
|
||||
const Backend = switch (builtin.os.tag) {
|
||||
.linux => INotifyBackend,
|
||||
.macos => FSEventsBackend,
|
||||
.macos => if (build_options.use_fsevents) FSEventsBackend else KQueueBackend,
|
||||
.freebsd => KQueueBackend,
|
||||
.windows => WindowsBackend,
|
||||
else => @compileError("file_watcher: unsupported OS"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue