png

Building and installing your own libpng from source

Simple “cmake” build and install

If you want to use “cmake” (see www.cmake.org), type

cd [your libpng source directory]
cmake . -DCMAKE_INSTALL_PREFIX=/path
make
make install

where “/path” points to the installation directory where you want to put the libpng “lib”, “include”, and “bin” subdirectories.

Building and installing libpng with “git” and “configure”

This will download libpng from the official “git” repository and build it in your “libpng” directory.

git clone https://github.com/glennrp/libpng.git libpng
cd libpng
./autogen.sh
./configure [--prefix=/path]
make install

where “/path” points to the installation directory where you want to put the libpng “lib”, “include”, and “bin” subdirectories.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow