mickael
(Mickaël Rémond)
1
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: swift-evolution/0208-package-manager-system-library-targets.md at master · apple/swift-evolution · GitHub
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 !
mickael
(Mickaël Rémond)
3
Thanks, I confirm this is working fine.
Why then master branch has changed the document. This section has been deleted from the document. Confused.
ljh
(ljh)
5
Thanks for the link.
It works with my own .so shared library [1] written in C which is not a system library. It works without pkg-config, dnf, yum, apt, ..
Hope it won't break and continues to work in the future swift releases.
[1] GitHub - ljhm/Swift-C: Use C code from shared library in Swift
ljh
(ljh)
6
Hi, I tried without umbrella and the extra header files. I specified all header files and .so libraries in .modulemap file. It worked.
But is it guaranteed to be correct?
module.modulemap:
module clib {
header "/usr/include/stdio.h"
header "../../../hello/hello.h"
link "c"
link "hello"
}