mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
cmake: Default to PNG_ARM_NEON=off for arm targets
This matches the configure script - unless the user has requested anything, no hardware optimizations are autoenabled. Defaulting to "check" is brittle (that configuration is deprecated and poorly supported) - and for configurations where it would make sense (where NEON isn't universally enabled in the compiler) it didn't end up setting ARM_NEON_OPT to 1 in pnglibconf.h anyway. This fixes default builds with cmake for iOS and Windows on armv7, where NEON is universally available (but there's no runtime check implemented) - but actually using NEON on this architecture requires explicitly opting in to it when configuring, just like with the configure script. Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
parent
12222e6fbd
commit
e56f79c0c6
@ -19,6 +19,7 @@
|
|||||||
# Revised by Owen Rudge, 2020
|
# Revised by Owen Rudge, 2020
|
||||||
# Revised by Gleb Mazovetskiy, 2021
|
# Revised by Gleb Mazovetskiy, 2021
|
||||||
# Revised by Christopher Sean Morrison, 2022
|
# Revised by Christopher Sean Morrison, 2022
|
||||||
|
# Revised by Martin Storsjo, 2022
|
||||||
|
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -98,8 +99,8 @@ if(TARGET_ARCH MATCHES "^arm" OR
|
|||||||
CACHE STRING "Enable ARM NEON optimizations: on|off; on is default")
|
CACHE STRING "Enable ARM NEON optimizations: on|off; on is default")
|
||||||
else()
|
else()
|
||||||
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
|
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
|
||||||
set(PNG_ARM_NEON "check"
|
set(PNG_ARM_NEON "off"
|
||||||
CACHE STRING "Enable ARM NEON optimizations: check|on|off; check is default")
|
CACHE STRING "Enable ARM NEON optimizations: check|on|off; off is default")
|
||||||
endif()
|
endif()
|
||||||
set_property(CACHE PNG_ARM_NEON
|
set_property(CACHE PNG_ARM_NEON
|
||||||
PROPERTY STRINGS ${PNG_ARM_NEON_POSSIBLE_VALUES})
|
PROPERTY STRINGS ${PNG_ARM_NEON_POSSIBLE_VALUES})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user