]> granicus.if.org Git - libjpeg-turbo/commitdiff
Build: Fix regression in AltiVec SIMD detection
authorDRC <information@libjpeg-turbo.org>
Sat, 3 Dec 2016 21:17:09 +0000 (21:17 +0000)
committerDRC <information@libjpeg-turbo.org>
Sat, 3 Dec 2016 21:19:41 +0000 (15:19 -0600)
Only the SIMD source files should be built with -maltivec.  Otherwise
the detection code will not be compiled in.

simd/CMakeLists.txt

index a4a69b2e2a06fdc924e208893615ec95afdb7a1d..6ae794fabb03b24707fdbde2982fc638e2b5f73f 100755 (executable)
@@ -274,11 +274,12 @@ set(SIMD_SOURCES powerpc/jccolor-altivec.c powerpc/jcgray-altivec.c
   powerpc/jdmerge-altivec.c powerpc/jdsample-altivec.c
   powerpc/jfdctfst-altivec.c powerpc/jfdctint-altivec.c
   powerpc/jidctfst-altivec.c powerpc/jidctint-altivec.c
-  powerpc/jquanti-altivec.c powerpc/jsimd.c)
+  powerpc/jquanti-altivec.c)
 
-add_definitions(-maltivec)
+set_source_files_properties(${SIMD_SOURCES} PROPERTIES
+  COMPILE_FLAGS -maltivec)
 
-add_library(simd OBJECT ${SIMD_SOURCES})
+add_library(simd OBJECT ${SIMD_SOURCES} powerpc/jsimd.c)
 
 if(CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED)
   set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)