mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 02:09:02 +08:00
Update JPEG, PNG, TIFF to build mac-universal
This commit is contained in:
parent
0436acc7d9
commit
793e9f08fc
4
deps/+JPEG/JPEG.cmake
vendored
4
deps/+JPEG/JPEG.cmake
vendored
@ -1,6 +1,6 @@
|
||||
add_cmake_project(JPEG
|
||||
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.6.zip
|
||||
URL_HASH SHA256=017bdc33ff3a72e11301c0feb4657cb27719d7f97fa67a78ed506c594218bbf1
|
||||
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.0.1.zip
|
||||
URL_HASH SHA256=d6d99e693366bc03897677650e8b2dfa76b5d6c54e2c9e70c03f0af821b0a52f
|
||||
CMAKE_ARGS
|
||||
-DENABLE_SHARED=OFF
|
||||
-DENABLE_STATIC=ON
|
||||
|
16
deps/+PNG/PNG.cmake
vendored
16
deps/+PNG/PNG.cmake
vendored
@ -1,27 +1,19 @@
|
||||
if (APPLE)
|
||||
# Only disable NEON extension for Apple ARM builds, leave it enabled for Raspberry PI.
|
||||
set(_disable_neon_extension "-DPNG_ARM_NEON=off")
|
||||
set(_disable_neon_extension "-DPNG_ARM_NEON:STRING=off")
|
||||
else ()
|
||||
set(_disable_neon_extension "")
|
||||
endif ()
|
||||
|
||||
set(_patch_step "")
|
||||
if (APPLE)
|
||||
set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch)
|
||||
endif ()
|
||||
|
||||
add_cmake_project(PNG
|
||||
# GIT_REPOSITORY https://github.com/glennrp/libpng.git
|
||||
# GIT_TAG v1.6.35
|
||||
URL https://github.com/glennrp/libpng/archive/refs/tags/v1.6.35.zip
|
||||
URL_HASH SHA256=3d22d46c566b1761a0e15ea397589b3a5f36ac09b7c785382e6470156c04247f
|
||||
"${_patch_step}"
|
||||
URL https://github.com/glennrp/libpng/archive/refs/tags/v1.6.40.zip
|
||||
URL_HASH SHA256=ab3f88779f0661bbb07c60e778fda782216bff70355d86848fbf6a327084563a
|
||||
CMAKE_ARGS
|
||||
-DPNG_SHARED=OFF
|
||||
-DPNG_STATIC=ON
|
||||
-DPNG_PREFIX=prusaslicer_
|
||||
-DPNG_TESTS=OFF
|
||||
-DDISABLE_DEPENDENCY_TRACKING=OFF
|
||||
-DPNG_EXECUTABLES=OFF
|
||||
${_disable_neon_extension}
|
||||
)
|
||||
|
||||
|
26
deps/+PNG/PNG.patch
vendored
26
deps/+PNG/PNG.patch
vendored
@ -1,26 +0,0 @@
|
||||
Common subdirectories: ../libpng-1.6.35-orig/arm and ./arm
|
||||
Common subdirectories: ../libpng-1.6.35-orig/contrib and ./contrib
|
||||
Common subdirectories: ../libpng-1.6.35-orig/intel and ./intel
|
||||
Common subdirectories: ../libpng-1.6.35-orig/mips and ./mips
|
||||
Only in ./: PNG.patch
|
||||
diff -u ../libpng-1.6.35-orig/pngrutil.c ./pngrutil.c
|
||||
--- ../libpng-1.6.35-orig/pngrutil.c 2018-07-15 20:58:00.000000000 +0200
|
||||
+++ ./pngrutil.c 2021-03-24 15:59:38.687108444 +0100
|
||||
@@ -422,13 +422,6 @@
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
|
||||
}
|
||||
|
||||
-#if ZLIB_VERNUM >= 0x1290 && \
|
||||
- defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
|
||||
- if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
|
||||
- /* Turn off validation of the ADLER32 checksum in IDAT chunks */
|
||||
- ret = inflateValidate(&png_ptr->zstream, 0);
|
||||
-#endif
|
||||
-
|
||||
if (ret == Z_OK)
|
||||
png_ptr->zowner = owner;
|
||||
|
||||
Common subdirectories: ../libpng-1.6.35-orig/powerpc and ./powerpc
|
||||
Common subdirectories: ../libpng-1.6.35-orig/projects and ./projects
|
||||
Common subdirectories: ../libpng-1.6.35-orig/scripts and ./scripts
|
||||
Common subdirectories: ../libpng-1.6.35-orig/tests and ./tests
|
8
deps/+TIFF/TIFF.cmake
vendored
8
deps/+TIFF/TIFF.cmake
vendored
@ -1,7 +1,9 @@
|
||||
add_cmake_project(TIFF
|
||||
URL https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.zip
|
||||
URL_HASH SHA256=c56edfacef0a60c0de3e6489194fcb2f24c03dbb550a8a7de5938642d045bd32
|
||||
URL https://gitlab.com/libtiff/libtiff/-/archive/v4.6.0/libtiff-v4.6.0.zip
|
||||
URL_HASH SHA256=5d652432123223338a6ee642a6499d98ebc5a702f8a065571e1001d4c08c37e6
|
||||
CMAKE_ARGS
|
||||
-Dtiff-tools:BOOL=OFF
|
||||
-Dtiff-tests:BOOL=OFF
|
||||
-Dlzma:BOOL=OFF
|
||||
-Dwebp:BOOL=OFF
|
||||
-Djbig:BOOL=OFF
|
||||
@ -9,4 +11,4 @@ add_cmake_project(TIFF
|
||||
-Dpixarlog:BOOL=OFF
|
||||
)
|
||||
|
||||
set(DEP_TIFF_DEPENDS ZLIB PNG OpenGL)
|
||||
set(DEP_TIFF_DEPENDS ZLIB PNG JPEG OpenGL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user