mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Implementing an initial `Finddispatch.cmake` module to find Dispatch from the system SDK on Apple platforms. Still should implement a basic mechanism for finding it on Windows and Linux. Note that those platforms will likely use the dispatch config mechanism most frequently, but this should still work as a fallback. This mechanism is the only one that works for Apple platforms though as those use libdispatch from the SDK rather than building it with corelibs-libdispatch. When building for Linux and Windows, it is possible to build a custom corelibs-libdispatch runtime with `dispatch_DIR` and avoid this module. This module makes it possible to use a pre-built corelibs-libdispatch when one is available without needing to build it. The module uses the `Swift_SDKROOT` filepath as a hint on where to look for the runtime libraries and the `dispatch_STATIC` boolean to specify whether it should find the dynamic library or the static archive.