mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
LibCore: Implement FileWatcher for macOS
The macOS FileWatcher depends on macOS dispatch queues, which run on a different thread than the Core::EventLoop. This implementation handles filesystem events on its dispatch queue, then forwards the event back to the main Core::EventLoop for notifying the FileWatcher owner.
This commit is contained in:
parent
8438c509e9
commit
0dce7b72f9
3 changed files with 286 additions and 1 deletions
|
@ -49,9 +49,17 @@ if (SERENITYOS)
|
|||
list(APPEND SOURCES FileWatcherSerenity.cpp)
|
||||
elseif (LINUX AND NOT EMSCRIPTEN)
|
||||
list(APPEND SOURCES FileWatcherLinux.cpp)
|
||||
elseif (APPLE)
|
||||
list(APPEND SOURCES FileWatcherMacOS.mm)
|
||||
else()
|
||||
list(APPEND SOURCES FileWatcherUnimplemented.cpp)
|
||||
endif()
|
||||
|
||||
serenity_lib(LibCore core)
|
||||
target_link_libraries(LibCore PRIVATE LibCrypt LibSystem)
|
||||
|
||||
if (APPLE)
|
||||
target_link_libraries(LibCore PUBLIC "-framework CoreFoundation")
|
||||
target_link_libraries(LibCore PUBLIC "-framework CoreServices")
|
||||
target_link_libraries(LibCore PUBLIC "-framework Foundation")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue