PNG.cmake 902 B

12345678910111213141516171819202122232425262728293031
  1. if (APPLE)
  2. # Only disable NEON extension for Apple ARM builds, leave it enabled for Raspberry PI.
  3. set(_disable_neon_extension "-DPNG_ARM_NEON=off")
  4. else ()
  5. set(_disable_neon_extension "")
  6. endif ()
  7. set(_patch_step "")
  8. if (APPLE)
  9. set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch)
  10. endif ()
  11. prusaslicer_add_cmake_project(PNG
  12. # GIT_REPOSITORY https://github.com/glennrp/libpng.git
  13. # GIT_TAG v1.6.35
  14. URL https://github.com/glennrp/libpng/archive/refs/tags/v1.6.35.zip
  15. URL_HASH SHA256=3d22d46c566b1761a0e15ea397589b3a5f36ac09b7c785382e6470156c04247f
  16. DEPENDS ${ZLIB_PKG}
  17. "${_patch_step}"
  18. CMAKE_ARGS
  19. -DPNG_SHARED=OFF
  20. -DPNG_STATIC=ON
  21. -DPNG_PREFIX=prusaslicer_
  22. -DPNG_TESTS=OFF
  23. -DDISABLE_DEPENDENCY_TRACKING=OFF
  24. ${_disable_neon_extension}
  25. )
  26. if (MSVC)
  27. add_debug_dep(dep_PNG)
  28. endif ()