diff options
Diffstat (limited to 'deps/PNG/PNG.cmake')
-rw-r--r-- | deps/PNG/PNG.cmake | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/deps/PNG/PNG.cmake b/deps/PNG/PNG.cmake index e07afec6d..11357f9ef 100644 --- a/deps/PNG/PNG.cmake +++ b/deps/PNG/PNG.cmake @@ -5,18 +5,36 @@ else () set(_disable_neon_extension "") endif () -prusaslicer_add_cmake_project(PNG - GIT_REPOSITORY https://github.com/glennrp/libpng.git - GIT_TAG v1.6.35 - DEPENDS ${ZLIB_PKG} - CMAKE_ARGS - -DPNG_SHARED=OFF - -DPNG_STATIC=ON - -DPNG_PREFIX=prusaslicer_ - -DPNG_TESTS=OFF - -DDISABLE_DEPENDENCY_TRACKING=OFF - ${_disable_neon_extension} +if(APPLE AND IS_CROSS_COMPILE) +# TODO: check if it doesn't create problem when compiling from arm to x86_64 + prusaslicer_add_cmake_project(PNG + GIT_REPOSITORY https://github.com/glennrp/libpng.git + GIT_TAG v1.6.35 + DEPENDS ${ZLIB_PKG} + PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df && + ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/macos-arm64.patch + CMAKE_ARGS + -DPNG_SHARED=OFF + -DPNG_STATIC=ON + -DPNG_PREFIX=prusaslicer_ + -DPNG_TESTS=OFF + -DDISABLE_DEPENDENCY_TRACKING=OFF + ${_disable_neon_extension} + ) +else () + prusaslicer_add_cmake_project(PNG + GIT_REPOSITORY https://github.com/glennrp/libpng.git + GIT_TAG v1.6.35 + DEPENDS ${ZLIB_PKG} + CMAKE_ARGS + -DPNG_SHARED=OFF + -DPNG_STATIC=ON + -DPNG_PREFIX=prusaslicer_ + -DPNG_TESTS=OFF + -DDISABLE_DEPENDENCY_TRACKING=OFF + ${_disable_neon_extension} ) +endif() if (MSVC) add_debug_dep(dep_PNG) |