Crate libpng_src

Source
Expand description

Helper Cargo package for compiling libpng into a static C library.

Meant to be used as build dependency for dufferent -sys or -vendored packages. Does not provide directly usable libpng functionality or bindings.

Expected to work for:

  • Linux: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu (no cross-compilation supported yet)
  • Windows: x86_64-pc-windows-msvc, aarch644-pc-windows-msvc (no cross-compilation supported yet)
  • macOS: x86_64-apple-darwin, aarch64-apple-darwin
  • iOS, including simulators (cross-compilation from macOS host): x86_64-apple-ios, aarch64-apple-ios, aarch64-apple-ios-sim

Structs§

Artifacts
Represents result of complete building.

Constants§

LIBPNG_VERSION
Version of the libpng library

Functions§

build_artifact
Builds all artifacts and aggregates library and include headers in a directory. Would create working directory if missing. Would remove previous content of ‘build/’ and ‘libpng/’ subdirectories if not empty (see below).
compile_lib
Statically compiles libpng library and returns the path to the compiled artifact. Should be used when include headers are not needed. Would create working directory if missing, would remove its previous content if not empty.
source_path
Returns the path to the source directory without any modifications.