Fix missing cpu-features for Android.

Change-Id: Ief13b7c63b96194970b00a5732aa080f794e7ae6
(cherry picked from commit d2223d8d6c)
This commit is contained in:
Vincent Rabaud 2016-08-05 09:26:32 +02:00 committed by James Zern
parent ab4c8056e0
commit 0ae32226ce

View File

@ -19,6 +19,20 @@ endif()
include(cmake/config.h.cmake) include(cmake/config.h.cmake)
################################################################################
# Android only.
if(ANDROID)
include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
add_library(cpufeatures STATIC
${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c
)
target_link_libraries(cpufeatures dl)
set(WEBP_DEP_LIBRARIES ${WEBP_DEP_LIBRARIES} cpufeatures)
set(WEBP_DEP_INCLUDE_DIRS ${WEBP_DEP_INCLUDE_DIRS}
${ANDROID_NDK}/sources/android/cpufeatures
)
endif()
################################################################################ ################################################################################
# WebP source files. # WebP source files.
# Read the Makefile.am to get the source files. # Read the Makefile.am to get the source files.
@ -48,7 +62,7 @@ parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/dsp "${WEBP_SRCS}")
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/enc "${WEBP_SRCS}") parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/enc "${WEBP_SRCS}")
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/utils "${WEBP_SRCS}") parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/utils "${WEBP_SRCS}")
# Remove the files specific to SIMD we don't user. # Remove the files specific to SIMD we don't use.
foreach(FILE ${WEBP_SIMD_FILES_NOT_TO_INCLUDE}) foreach(FILE ${WEBP_SIMD_FILES_NOT_TO_INCLUDE})
list(REMOVE_ITEM WEBP_SRCS ${FILE}) list(REMOVE_ITEM WEBP_SRCS ${FILE})
endforeach() endforeach()