From 5c9bb83e3734128808559d4bb87faa0c80308c15 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 4 Jun 2021 20:30:57 -0700 Subject: [PATCH] Build: Disable NEON png on non-Android too. Just to be safe. It's likely a problem on iOS, etc. too. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d631f162f..f6719dff7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,9 +270,11 @@ foreach (LANGUAGE C CXX) endforeach() if(NOT MSVC) + # NEON optimizations in libpng17 seem to cause PNG load errors, see #14485. + add_definitions(-DPNG_ARM_NEON_OPT=0) + if(ANDROID) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") - add_definitions(-DPNG_ARM_NEON_OPT=0) endif() if(CLANG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-uninitialized")