@ -19,8 +19,9 @@ OPENCV_3RDPARTY_LIBS_DIR:=@OPENCV_3RDPARTY_LIBS_DIR_CONFIGCMAKE@
OPENCV_BASEDIR := @OPENCV_BASE_INCLUDE_DIR_CONFIGCMAKE@
OPENCV_LOCAL_C_INCLUDES := @OPENCV_INCLUDE_DIRS_CONFIGCMAKE@
OPENCV_MODULES := @OPENCV_MODULES_CONFIGMAKE@
OPENCV_DYNAMICUDA_MODULE := @OPENCV_DYNAMICUDA_MODULE_CONFIGMAKE@
OPENCV_HAVE_GPU_MODULE = @OPENCV_HAVE_GPU_MODULE_CONFIGMAKE@
OPENCV_HAVE_GPU_MODULE : = @OPENCV_HAVE_GPU_MODULE_CONFIGMAKE@
OPENCV_USE_GPU_MODULE :=
i f e q ( $( TARGET_ARCH_ABI ) , a r m e a b i - v 7 a )
@ -31,7 +32,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
endif
e n d i f
CUDA_RUNTIME_LIBS := cufft npps nppi nppc cudart
CUDA_RUNTIME_LIBS := @CUDA_RUNTIME_LIBS_CONFIGMAKE@
i f e q ( $( OPENCV_LIB_TYPE ) , )
OPENCV_LIB_TYPE:= @OPENCV_LIBTYPE_CONFIGMAKE@
@ -67,7 +68,7 @@ else
endif
e n d i f
i f e q ( $ { O P E N C V _ C A M E R A _ M O D U L E S } , o n )
i f e q ( $( OPENCV_CAMERA_MODULES ) , o n )
ifeq ( $( TARGET_ARCH_ABI) ,armeabi)
OPENCV_CAMERA_MODULES:= @OPENCV_CAMERA_LIBS_ARMEABI_CONFIGCMAKE@
endif
@ -98,6 +99,13 @@ define add_opencv_module
include $( PREBUILT_$( OPENCV_LIB_TYPE) _LIBRARY)
e n d e f
d e f i n e a d d _ c u d a _ m o d u l e
include $( CLEAR_VARS)
LOCAL_MODULE:= $1
LOCAL_SRC_FILES:= $( CUDA_TOOLKIT_DIR) /targets/armv7-linux-androideabi/lib/lib$1 .so
include $( PREBUILT_SHARED_LIBRARY)
e n d e f
d e f i n e a d d _ o p e n c v _ 3 r d p a r t y _ c o m p o n e n t
include $( CLEAR_VARS)
LOCAL_MODULE:= $1
@ -115,6 +123,15 @@ endef
i f e q ( $( OPENCV_MK_ $ ( OPENCV_TARGET_ARCH_ABI ) _ALREADY_INCLUDED ) , )
ifeq ( $( OPENCV_INSTALL_MODULES) ,on)
$( foreach module,$( OPENCV_LIBS) ,$( eval $( call add_opencv_module,$( module) ) ) )
ifneq ( $( OPENCV_DYNAMICUDA_MODULE) ,)
$( eval $( call add_opencv_module,$( OPENCV_DYNAMICUDA_MODULE) ) )
endif
endif
ifeq ( $( OPENCV_USE_GPU_MODULE) ,on)
ifeq ( $( INSTALL_CUDA_LIBRARIES) ,on)
$( foreach module,$( CUDA_RUNTIME_LIBS) ,$( eval $( call add_cuda_module,$( module) ) ) )
endif
endif
$( foreach module,$( OPENCV_3RDPARTY_COMPONENTS) ,$( eval $( call add_opencv_3rdparty_component,$( module) ) ) )
@ -159,6 +176,11 @@ endif
i f e q ( $( OPENCV_INSTALL_MODULES ) , o n )
LOCAL_$( OPENCV_LIB_TYPE) _LIBRARIES += $( foreach mod, $( OPENCV_LIBS) , opencv_$( mod) )
ifeq ( $( OPENCV_LIB_TYPE) ,SHARED)
ifneq ( $( OPENCV_DYNAMICUDA_MODULE) ,)
LOCAL_$( OPENCV_LIB_TYPE) _LIBRARIES += $( OPENCV_DYNAMICUDA_MODULE)
endif
endif
e l s e
LOCAL_LDLIBS += -L$( call host-path,$( LOCAL_PATH) /$( OPENCV_LIBS_DIR) ) $( foreach lib, $( OPENCV_LIBS) , -lopencv_$( lib) )
e n d i f
@ -170,8 +192,12 @@ endif
LOCAL_LDLIBS += $( foreach lib,$( OPENCV_EXTRA_COMPONENTS) , -l$( lib) )
i f e q ( $( OPENCV_USE_GPU_MODULE ) , o n )
LOCAL_STATIC_LIBRARIES += libopencv_gpu
ifeq ( $( INSTALL_CUDA_LIBRARIES) ,on)
LOCAL_SHARED_LIBRARIES += $( foreach mod, $( CUDA_RUNTIME_LIBS) , $( mod) )
else
LOCAL_LDLIBS += -L$( CUDA_TOOLKIT_DIR) /targets/armv7-linux-androideabi/lib $( foreach lib, $( CUDA_RUNTIME_LIBS) , -l$( lib) )
endif
LOCAL_STATIC_LIBRARIES += libopencv_gpu
e n d i f
#restore the LOCAL_PATH