Referring to libxml2 in Swift Package Description

I'm happy to say that this issue has now been fixed as of Xcode 11.4 beta 1. All you need to do is import libxml2 just as you would any other module from the SDK such as Foundation or UIKit -- no additional search paths or configuration are needed.

For C targets you can also change the import style from #import <libxml2/libxml/*.h> to just #import <libxml/*.h> for compatibility with the more common header layout on Linux.

11 Likes