[swift-build-dev] How to specify system header dependencies

Daniel Dunbar daniel_dunbar at apple.com
Mon Dec 14 10:28:20 CST 2015

> On Dec 14, 2015, at 8:15 AM, Evan Maloney via swift-build-dev <swift-build-dev at swift.org> wrote:
> Hello,
> I have a project that has a dependency on the asl.h system header.
> This header is present on all Apple platforms. When building with Xcode, this dependency is specified in the bridging header, allowing the C API provided by asl.h to be exposed to Swift.

For now, the only way to do this is with the "system modules" feature (and a hard coded path): https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md

> As far as I can tell, there's no way to specify a bridging header using the Swift Package Manager or to otherwise specify a C API to expose to Swift.
> Am I mistaken? Am I just missing something? Or is SPM only intended to be used to build something in "pure Swift"?

You are correct, but it isn't about "intention", this is just stuff which isn't supported *yet*.

 - Daniel

> Thanks,
> Evan
> _______________________________________________
> swift-build-dev mailing list
> swift-build-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-build-dev

More information about the swift-build-dev mailing list