SwiftZSTD icon indicating copy to clipboard operation
SwiftZSTD copied to clipboard

Update for Xcode 12 & SPM

Open ArnaudWurmel opened this issue 3 years ago • 0 comments

Hello,

As we are using this framework for our application, and we are migrating from Carthage to SwiftPM, I looked at the issue #7 and the work from @alizx.

Some architectural changes were required to make it work but I tried as much as possible to not modify the code that you did.

This PR isn't supporting Carthage anymore since I couldn't find something to make it work. If anyone is interested to make the Carthage support, I would gladly update my PR with his modifications.

The iOSTestApp (that only import the framework to try the compilation) is not included anymore as it's much more complicated to import the SPM framework in a local app and the gain provided is very low.

The project must be splitted because SPM doesn't support mixed language for a same target. So I went for these three targets:

SwiftZSTD: Containing all the Swift source codes
SwiftZSTDC: Containing the OBJ-C source code
zstdlib: Containg the C library

SwiftZSTDC is depending on zstdlib target and SwiftZSTD is depending on both zstdlib and SwiftZSTDC targets.

Finally, the targets are grouped into the same library file (SwiftZSTD).

Additionally, I updated the zstdlib to its latest version (1.5.0).

If you have any comment about this issue, feel free to contact me, I will make the required modifications.

ArnaudWurmel avatar Oct 26 '21 07:10 ArnaudWurmel