android: IPPICV static libraries workarounds for NDK 16

This commit is contained in:
Alexander Alekhin 2018-01-05 00:24:02 +00:00
parent b76a691bcf
commit 5f9bb6249e
2 changed files with 17 additions and 0 deletions

View File

@ -18,6 +18,13 @@ if(WITH_IPP)
endif()
ocv_include_directories(${IPP_INCLUDE_DIRS})
list(APPEND OPENCV_LINKER_LIBS ${IPP_LIBRARIES})
# Details: #10229
if(ANDROID AND NOT OPENCV_SKIP_ANDROID_IPP_FIX_1)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a ${CMAKE_SHARED_LINKER_FLAGS}")
elseif(ANDROID AND NOT OPENCV_SKIP_ANDROID_IPP_FIX_2)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic ${CMAKE_SHARED_LINKER_FLAGS}")
endif()
endif()
endif()

View File

@ -88,6 +88,16 @@ LOCAL_STATIC_LIBRARIES:=$(USER_LOCAL_STATIC_LIBRARIES)
LOCAL_SHARED_LIBRARIES:=$(USER_LOCAL_SHARED_LIBRARIES)
LOCAL_LDLIBS:=$(USER_LOCAL_LDLIBS)
# Details: #10229
ifeq ($(OPENCV_SKIP_ANDROID_IPP_FIX_1),)
LOCAL_LDFLAGS += -Wl,--exclude-libs,libippicv.a
LOCAL_LDFLAGS += -Wl,--exclude-libs,libippiw.a
else
ifeq ($(OPENCV_SKIP_ANDROID_IPP_FIX_2),)
LOCAL_LDFLAGS += -Wl,-Bsymbolic
endif
endif
LOCAL_C_INCLUDES += $(OPENCV_LOCAL_C_INCLUDES)
LOCAL_CFLAGS += $(OPENCV_LOCAL_CFLAGS)