include(ExternalProject)

ExternalProject_Add(
  libpng SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/libpng GIT_REPOSITORY https://github.com/pnggroup/libpng.git
  GIT_TAG v1.6.58 GIT_SHALLOW TRUE
  CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${DEPS_INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR:STRING=lib
             -DPNG_TESTS:BOOL=OFF -DPNG_TOOLS:BOOL=OFF
)
