Skip to content

Instantly share code, notes, and snippets.

@cobysy
Last active April 11, 2019 19:07
Show Gist options
  • Save cobysy/9071bd1e7c4256745acd to your computer and use it in GitHub Desktop.
Save cobysy/9071bd1e7c4256745acd to your computer and use it in GitHub Desktop.
Build libpng with Xcode
# install command line developer tools
xcode-select --install
# update macports
sudo port selfupdate; sudo port upgrade outdated
# install cmake
sudo port install cmake
# download and extract libpng
curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.12.tar.xz
tar xvf libpng-1.6.12.tar.xz
cd libpng-1.6.12
# make project files
cmake -G Xcode
# configure and make and install
./configure
make
sudo make install
# header files and binaries
ls /usr/local/include/libpng16/
ls /usr/local/lib/libpng*
# open in xcode
open libpng.xcodeproj/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment