[libpng17] Ported new ARM support in CMakeLists.txt from libpng16

This commit is contained in:
Glenn Randers-Pehrson 2016-12-27 11:35:56 -06:00
parent b14987b483
commit e6470a8876
3 changed files with 33 additions and 0 deletions

View File

@ -1419,6 +1419,7 @@ Version 1.7.0beta85 [December 27, 2016]
operation. operation.
Version 1.7.0beta86 [December 27, 2016] Version 1.7.0beta86 [December 27, 2016]
Ported CMakeLists.txt from libpng-1.6.27rc01.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -5719,6 +5719,7 @@ Version 1.7.0beta85 [December 27, 2016]
operation. operation.
Version 1.7.0beta86 [December 27, 2016] Version 1.7.0beta86 [December 27, 2016]
Ported CMakeLists.txt from libpng-1.6.27rc01.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -5,6 +5,7 @@
# Revised by Roger Lowman, 2009-2010 # Revised by Roger Lowman, 2009-2010
# Revised by Clifford Yapp, 2011-2012 # Revised by Clifford Yapp, 2011-2012
# Revised by Roger Leigh, 2016 # Revised by Roger Leigh, 2016
# Revised by Andreas Franek, 2016
# 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
@ -69,6 +70,35 @@ option(PNGARG "Disable ANSI-C prototypes" OFF)
set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
# set definitions and sources for arm
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
check: (default) use internal checking code;
off: disable the optimizations;
on: turn on unconditionally.")
set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
${PNG_ARM_NEON_POSSIBLE_VALUES})
list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
if(index EQUAL -1)
message(FATAL_ERROR
" PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_ARM_NEON} STREQUAL "no")
set(libpng_arm_sources
arm/arm_init.c
arm/filter_neon.S
arm/filter_neon_intrinsics.c)
if(${PNG_ARM_NEON} STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(${PNG_ARM_NEON} STREQUAL "check")
add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
endif()
else()
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
endif()
# SET LIBNAME # SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
@ -360,6 +390,7 @@ set(libpng_sources
pngwrite.c pngwrite.c
pngwtran.c pngwtran.c
pngwutil.c pngwutil.c
${libpng_arm_sources}
) )
set(pngtest_sources set(pngtest_sources
pngtest.c pngtest.c