set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif()
+ if (HAVE_opencv_gpu)
+ set(OPENCV_PREBUILT_GPU_MODULE_CONFIGMAKE "on")
+ endif()
+
# setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)
set(OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE "")
foreach(m ${OPENCV_MODULES_PUBLIC})
list(INSERT OPENCV_MODULES_CONFIGMAKE 0 ${${m}_MODULE_DEPS_${ocv_optkind}} ${m})
- if(${m}_EXTRA_DEPS_${ocv_optkind})
+ if(${m}_EXTRA_DEPS_${ocv_optkind} AND NOT ${m}_EXTRA_DEPS_${ocv_optkind} MATCHES "libcu.+$")
list(INSERT OPENCV_EXTRA_COMPONENTS_CONFIGMAKE 0 ${${m}_EXTRA_DEPS_${ocv_optkind}})
endif()
endforeach()
OPENCV_LOCAL_C_INCLUDES:=@OPENCV_INCLUDE_DIRS_CONFIGCMAKE@
OPENCV_MODULES:=@OPENCV_MODULES_CONFIGMAKE@
+OPENCV_PREBUILT_GPU_MODULE:=@OPENCV_PREBUILT_GPU_MODULE_CONFIGMAKE@
+OPENCV_USE_GPU_MODULE:=
+
+ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
+ ifeq ($(OPENCV_PREBUILT_GPU_MODULE),on)
+ ifneq ($(CUDA_TOOLKIT_DIR),)
+ OPENCV_USE_GPU_MODULE:=on
+ endif
+ endif
+endif
+
+CUDA_RUNTIME_LIBS:=cufft npps nppi nppc cudart
+
ifeq ($(OPENCV_LIB_TYPE),)
OPENCV_LIB_TYPE:=@OPENCV_LIBTYPE_CONFIGMAKE@
endif
OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED:=on
endif
+ifeq ($(OPENCV_USE_GPU_MODULE),on)
+ include $(CLEAR_VARS)
+ LOCAL_MODULE:=opencv_gpu
+ LOCAL_SRC_FILES:=$(OPENCV_LIBS_DIR)/libopencv_gpu.a
+ include $(PREBUILT_STATIC_LIBRARY)
+endif
+
ifeq ($(OPENCV_LOCAL_CFLAGS),)
OPENCV_LOCAL_CFLAGS := -fPIC -DANDROID -fsigned-char
endif
LOCAL_C_INCLUDES += $(OPENCV_LOCAL_C_INCLUDES)
LOCAL_CFLAGS += $(OPENCV_LOCAL_CFLAGS)
+ifeq ($(OPENCV_USE_GPU_MODULE),on)
+ LOCAL_C_INCLUDES += $(CUDA_TOOLKIT_DIR)/include
+endif
+
ifeq ($(OPENCV_INSTALL_MODULES),on)
LOCAL_$(OPENCV_LIB_TYPE)_LIBRARIES += $(foreach mod, $(OPENCV_LIBS), opencv_$(mod))
else
LOCAL_LDLIBS += $(foreach lib,$(OPENCV_EXTRA_COMPONENTS), -l$(lib))
+ifeq ($(OPENCV_USE_GPU_MODULE),on)
+ LOCAL_STATIC_LIBRARIES+=libopencv_gpu
+ LOCAL_LDLIBS += -L$(CUDA_TOOLKIT_DIR)/lib $(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib))
+endif
+
#restore the LOCAL_PATH
LOCAL_PATH:=$(USER_LOCAL_PATH)