mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms.
This commit is contained in:
parent
918a6ac2b4
commit
f16c3406cd
5
ANNOUNCE
5
ANNOUNCE
@ -1,4 +1,4 @@
|
|||||||
Libpng 1.6.31beta03 - July 8, 2017
|
Libpng 1.6.31beta03 - July 9, 2017
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -74,7 +74,8 @@ Version 1.6.31beta02 [July 8, 2017]
|
|||||||
Added "--enable-hardware-optimizations" configuration flag to enable
|
Added "--enable-hardware-optimizations" configuration flag to enable
|
||||||
or disable all hardware optimizations with one flag.
|
or disable all hardware optimizations with one flag.
|
||||||
|
|
||||||
Version 1.6.31beta03 [July 8, 2017]
|
Version 1.6.31beta03 [July 9, 2017]
|
||||||
|
Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms.
|
||||||
|
|
||||||
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
|
||||||
|
3
CHANGES
3
CHANGES
@ -5869,7 +5869,8 @@ Version 1.6.31beta02 [July 8, 2017]
|
|||||||
Added "--enable-hardware-optimizations" configuration flag to enable
|
Added "--enable-hardware-optimizations" configuration flag to enable
|
||||||
or disable all hardware optimizations with one flag.
|
or disable all hardware optimizations with one flag.
|
||||||
|
|
||||||
Version 1.6.31beta03 [July 8, 2017]
|
Version 1.6.31beta03 [July 9, 2017]
|
||||||
|
Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms.
|
||||||
|
|
||||||
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
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# CMakeLists.txt
|
# CMakeLists.txt
|
||||||
|
|
||||||
# Copyright (C) 2007,2009-2016 Glenn Randers-Pehrson
|
# Copyright (C) 2007,2009-2017 Glenn Randers-Pehrson
|
||||||
# Written by Christian Ehrlicher, 2007
|
# Written by Christian Ehrlicher, 2007
|
||||||
# Revised by Roger Lowman, 2009-2010
|
# Revised by Roger Lowman, 2009-2010
|
||||||
# Revised by Clifford Yapp, 2011-2012
|
# Revised by Clifford Yapp, 2011-2012
|
||||||
@ -36,7 +36,7 @@ enable_testing()
|
|||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 6)
|
set(PNGLIB_MINOR 6)
|
||||||
set(PNGLIB_RELEASE 30)
|
set(PNGLIB_RELEASE 31)
|
||||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||||
|
|
||||||
@ -76,9 +76,13 @@ option(PNG_FRAMEWORK "Build OS X framework" OFF)
|
|||||||
option(PNG_DEBUG "Build with debug output" OFF)
|
option(PNG_DEBUG "Build with debug output" OFF)
|
||||||
option(PNGARG "Disable ANSI-C prototypes" OFF)
|
option(PNGARG "Disable ANSI-C prototypes" OFF)
|
||||||
|
|
||||||
|
option(PNG_HARDWARE_OPTIMIZATIONS "Enable Hardware Optimizations" ON)
|
||||||
|
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
|
if(PNG_HARDWARE_OPTIMIZATIONS)
|
||||||
# set definitions and sources for arm
|
# set definitions and sources for arm
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
||||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
||||||
@ -112,11 +116,9 @@ endif()
|
|||||||
# set definitions and sources for powerpc
|
# set definitions and sources for powerpc
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
||||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*" )
|
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*" )
|
||||||
set(PNG_POWERPC_VSX_POSSIBLE_VALUES check on off)
|
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
|
||||||
set(PNG_POWERPC_VSX "check" CACHE STRING "Enable POWERPC VSX optimizations:
|
set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
|
||||||
check: (default) use internal checking code;
|
off: disable the optimizations.")
|
||||||
off: disable the optimizations;
|
|
||||||
on: turn on unconditionally.")
|
|
||||||
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
|
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
|
||||||
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
|
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
|
||||||
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
|
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
|
||||||
@ -127,19 +129,62 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
|||||||
set(libpng_powerpc_sources
|
set(libpng_powerpc_sources
|
||||||
powerpc/powerpc_init.c
|
powerpc/powerpc_init.c
|
||||||
powerpc/filter_vsx_intrinsics.c)
|
powerpc/filter_vsx_intrinsics.c)
|
||||||
|
|
||||||
if(${PNG_POWERPC_VSX} STREQUAL "on")
|
if(${PNG_POWERPC_VSX} STREQUAL "on")
|
||||||
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
|
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
|
||||||
elseif(${PNG_POWERPC_VSX} STREQUAL "check")
|
|
||||||
add_definitions(-DPNG_POWERPC_VSX_CHECK_SUPPORTED)
|
|
||||||
message(WARNING
|
|
||||||
"[PNG_POWERPC_VSX==check] Please check contrib/powerpc/README file for the list of supported OSes.")
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
|
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# set definitions and sources for intel
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*" )
|
||||||
|
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
|
||||||
|
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
|
||||||
|
off: disable the optimizations")
|
||||||
|
set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
|
||||||
|
${PNG_INTEL_SSE_POSSIBLE_VALUES})
|
||||||
|
list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
|
||||||
|
if(index EQUAL -1)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
" PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
|
||||||
|
elseif(NOT ${PNG_INTEL_SSE} STREQUAL "no")
|
||||||
|
set(libpng_intel_sources
|
||||||
|
intel/intel_init.c
|
||||||
|
intel/filter_sse2_intrinsics.c)
|
||||||
|
if(${PNG_INTEL_SSE} STREQUAL "on")
|
||||||
|
add_definitions(-DPNG_INTEL_SSE_OPT=1)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# set definitions and sources for MIPS
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*" )
|
||||||
|
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
|
||||||
|
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
|
||||||
|
off: disable the optimizations")
|
||||||
|
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
|
||||||
|
${PNG_MIPS_MSA_POSSIBLE_VALUES})
|
||||||
|
list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
|
||||||
|
if(index EQUAL -1)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
" PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
|
||||||
|
elseif(NOT ${PNG_MIPS_MSA} STREQUAL "no")
|
||||||
|
set(libpng_mips
|
||||||
|
mips/mips_init.c
|
||||||
|
mips/filter_msa_intrinsics.c)
|
||||||
|
if(${PNG_MIPS_MSA} STREQUAL "on")
|
||||||
|
add_definitions(-DPNG_MIPS_MSA_OPT=2)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_definitions(-DPNG_MIPS_MSA_OPT=0)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif(PNG_HARDWARE_OPTIMIZATIONS)
|
||||||
|
|
||||||
# SET LIBNAME
|
# SET LIBNAME
|
||||||
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
@ -433,6 +478,7 @@ set(libpng_sources
|
|||||||
pngwutil.c
|
pngwutil.c
|
||||||
${libpng_arm_sources}
|
${libpng_arm_sources}
|
||||||
${libpng_powerpc_sources}
|
${libpng_powerpc_sources}
|
||||||
|
${libpng_intel_sources}
|
||||||
)
|
)
|
||||||
set(pngtest_sources
|
set(pngtest_sources
|
||||||
pngtest.c
|
pngtest.c
|
||||||
@ -726,12 +772,12 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
|||||||
DEPENDS ${PNG_LIB_TARGETS}
|
DEPENDS ${PNG_LIB_TARGETS}
|
||||||
)
|
)
|
||||||
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||||
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
else(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
|
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
endif(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# Create source generation scripts.
|
# Create source generation scripts.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user