if(APPLE)
  find_package(PNG REQUIRED)
  find_library(CORE_FOUNDATION CoreFoundation REQUIRED)
elseif(LINUX)
  find_library(PNG_LIBRARY png)
elseif(ANDROID)
  find_library(PNG_LIBRARY png PATHS ${CMAKE_EXTERNAL_LIB} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
elseif(WINDOWS)
  find_debug_and_optimized_library(PNG_LIBRARY "libpng/debug" "libpng" "libpng/release" "libpng")
endif()

