Skip to content

Latest commit

 

History

History
81 lines (66 loc) · 2.33 KB

README.md

File metadata and controls

81 lines (66 loc) · 2.33 KB

LibPNG

Cross platform swift package for the libpng library.

Usage

To use libpng in swift, add libpng as a package dependency in your project's Package.swift file.
dependencies: [
  .package(url: "https://github.com/the-swift-collective/libpng.git", from: "1.6.45"),
]
Then, for any target you'd like, add the libpng 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/libpng.git", from: "1.6.45")
  ],
  targets: [
    .target(
      name: "MyLibrary",
      dependencies: [
        /* add the libpng product as a library dependency. */
        .product(name: "LibPNG", package: "libpng"),
      ]
    ),
  ]
)


the swift collective - cross platform swift packages.
libpng is licensed under the terms of the PNG Reference Library version 2 license.