https://github.com/milch/lz4-spm
Use lz4 in SPM
https://github.com/milch/lz4-spm
Last synced: about 1 year ago
JSON representation
Use lz4 in SPM
- Host: GitHub
- URL: https://github.com/milch/lz4-spm
- Owner: milch
- License: mit
- Created: 2021-02-03T06:08:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-04T01:12:40.000Z (over 5 years ago)
- Last Synced: 2025-02-28T08:44:28.729Z (over 1 year ago)
- Language: C
- Size: 96.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LZ4 in SPM
This package should allow to use the [lz4](https://github.com/lz4/lz4) library in Swift Package Manager.
## Example
```swift
import PackageDescription
let package = Package(
name: "Sample",
products: [.library(name: "LibSample", targets: ["LibSample"])]
dependencies: [
.package(
name: "lz4",
url: "https://github.com/milch/lz4",
.upToNextMinor(from: "1.9.3")),
//...
],
targets: [
.target(
name: "LibSample",
dependencies: [.product(name: "lz4", package: "lz4")],
// ...
)
]
)
```
## Updating
The way the lz4 source is organized is not directly compatible with SPM conventions. SPM expects a single `include` folder for public headers, whereas header and source files are next to each other in the lz4 repository.
Run the `update_lz4.sh` script to copy things into the place SPM expects and check in the changes:
```bash
./update_lz4.sh
git add Sources
```
The components which are copied are licensed under the BSD license, and the license statements are included at the top of the files.