aboutsummaryrefslogtreecommitdiff
path: root/tools/depends
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2022-05-01 09:03:48 +1000
committerfuzzard <fuzzard@kodi.tv>2022-05-01 09:03:48 +1000
commit615afd3f4f55c678f5994c9c3091e1321a14e138 (patch)
tree12f35dd1fcc68a7281778c9c00d9aeaad116c899 /tools/depends
parenteb516688a48477562520c3cbfcc036057bb79b30 (diff)
[tools/depends][target] libpng disable hardware call for apple aarch64 targets
M1 fails to build due to NEON instructions missing. disable hardware accelleration for darwin_embedded and aarch64 macos targets
Diffstat (limited to 'tools/depends')
-rw-r--r--tools/depends/target/libpng/Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/depends/target/libpng/Makefile b/tools/depends/target/libpng/Makefile
index 4e4def73bc..934ab4cce2 100644
--- a/tools/depends/target/libpng/Makefile
+++ b/tools/depends/target/libpng/Makefile
@@ -7,17 +7,20 @@ CMAKE_OPTIONS=-DPNG_SHARED=OFF \
-DPNG_TESTS=OFF \
-DPNG_DEBUG=OFF
-ifneq ($(findstring apple-darwin, $(HOST)), apple-darwin)
+ifeq ($(findstring apple-darwin, $(HOST)), apple-darwin)
+ # hardware optimizations require NEON instructions that
+ # fail on m1 hardware and ios/tvos, so just disable for any arm64 target cpu on
+ # an apple-darwin target
+ ifeq ($(CPU), arm64)
+ CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=OFF
+ else
+ CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON
+ endif
+else
CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON \
-DPNG_BUILD_ZLIB=ON \
-DZLIB_LIBRARY=$(PREFIX)/lib/libz.a \
-DZLIB_INCLUDE_DIR=$(PREFIX)/include
-else
- ifeq ($(OS), osx)
- CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON
- else
- CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=OFF
- endif
endif
LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT)