Skip to content

Commit a8ae9ca

Browse files
committed
3rdparty:libpng[1.6.34] Add missing support for PowerPC/VSX
1 parent 6cedc82 commit a8ae9ca

File tree

4 files changed

+904
-1
lines changed

4 files changed

+904
-1
lines changed

3rdparty/libpng/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ if(";${CPU_BASELINE_FINAL};" MATCHES "SSE2"
4343
add_definitions(-DPNG_INTEL_SSE)
4444
endif()
4545

46+
if(PPC64LE OR PPC64)
47+
if(ENABLE_VSX AND NOT PPC64)
48+
list(APPEND lib_srcs powerpc/powerpc_init.c powerpc/filter_vsx_intrinsics.c)
49+
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
50+
else()
51+
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
52+
endif()
53+
endif()
54+
4655
# ----------------------------------------------------------------------------------
4756
# Define the library target:
4857
# ----------------------------------------------------------------------------------

0 commit comments

Comments
 (0)