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.