Skip to content

Latest commit

 

History

History
81 lines (66 loc) · 2.24 KB

README.md

File metadata and controls

81 lines (66 loc) · 2.24 KB

ZLib

Cross platform swift package for the zlib library.

Usage

To use zlib in swift, add zlib as a package dependency in your project's Package.swift file.
dependencies: [
  .package(url: "https://github.com/the-swift-collective/zlib.git", from: "1.3.1"),
]
Then, for any target you'd like, add the zlib product as a target dependency, a complete example.
// swift-tools-version: 5.8
import PackageDescription

let package = Package(
  name: "MyPackage",
  products: [
    .library(
      name: "MyLibrary",
      targets: ["MyLibrary"]
    ),
  ],
  dependencies: [
    .package(url: "https://github.com/the-swift-collective/zlib.git", from: "1.3.1")
  ],
  targets: [
    .target(
      name: "MyLibrary",
      dependencies: [
        /* add the zlib product as a library dependency. */
        .product(name: "ZLib", package: "zlib"),
      ]
    ),
  ]
)


the swift collective - cross platform swift packages.
zlib is licensed under the terms of the zlib license.