diff --git a/cmake/templates/OpenCV.mk.in b/cmake/templates/OpenCV.mk.in index 97330e8545..16fc4c9ccb 100644 --- a/cmake/templates/OpenCV.mk.in +++ b/cmake/templates/OpenCV.mk.in @@ -19,7 +19,6 @@ 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_USE_GPU_MODULE:= @@ -30,6 +29,9 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) OPENCV_USE_GPU_MODULE:=on endif endif + OPENCV_DYNAMICUDA_MODULE:=@OPENCV_DYNAMICUDA_MODULE_CONFIGMAKE@ +else + OPENCV_DYNAMICUDA_MODULE:= endif CUDA_RUNTIME_LIBS:=@CUDA_RUNTIME_LIBS_CONFIGMAKE@ @@ -124,7 +126,9 @@ ifeq ($(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))) + ifeq ($(OPENCV_LIB_TYPE),SHARED) + $(eval $(call add_opencv_module,$(OPENCV_DYNAMICUDA_MODULE))) + endif endif endif