System target library: How to use them?

Hello,

While trying to prepare a package to wrap a system library (libxml2), I noticed the following warning:

warning: system packages are deprecated; use system library targets instead

I could not find much documentation on how to use it, except the Swift evolution proposal: https://github.com/apple/swift-evolution/blob/master/proposals/0208-package-manager-system-library-targets.md

Any tips on how to get started ? Where should I place my modulemap file ?

I would like to add the target system library in my package to avoid exposing an extra wrapper repository. It seems exactly what this features is about.

Thanks !

There is an updated howto here: https://github.com/apple/swift-package-manager/blob/263171977ebcd47f4aaca1202cff5a96c5158a64/Documentation/Usage.md#import-system-libraries

2 Likes

Thanks, I confirm this is working fine.

Terms of Service

Privacy Policy

Cookie Policy