I am trying to turn a public source library into a Swift Package Manager defined static library that is mixing existing static libraries with a .c file and several .swift files. I can compile it all in Xcode into one single static library. This procedure allows me to release my software later through the AppStore without running into any sandbox issues.
Basically, I have:
- several static libraries (.a & .o) that I need to link eventually with the rest of the package. I have these under Sources/libraries. They are several public source libraries that I need.
- the needed c header files for these libraries in Sources/headers
- some C wrappers in order to resolve macros: builtins.c and builtins.h in Sources/headers
- a Swift wrapper (several swift files) under Sources/SwiftWrapper
I have now tried to replicate this process with Swift Package Manager. I am struggling with specifying library locations, different languages and modulemap files. How to mix it all together?
Many thanks in advance!
Klaus