turn on CUDA part of nonfree module on Android for non-dynamic build
This commit is contained in:
		@@ -4,9 +4,9 @@ endif()
 | 
			
		||||
 | 
			
		||||
set(the_description "Functionality with possible limitations on the use")
 | 
			
		||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
 | 
			
		||||
if (ENABLE_DYNAMIC_CUDA)
 | 
			
		||||
  set(HAVE_CUDA FALSE)
 | 
			
		||||
if(ENABLE_DYNAMIC_CUDA)
 | 
			
		||||
  add_definitions(-DDYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
  ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_ocl)
 | 
			
		||||
else()
 | 
			
		||||
  ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl)
 | 
			
		||||
endif()
 | 
			
		||||
endif()
 | 
			
		||||
 
 | 
			
		||||
@@ -43,11 +43,7 @@
 | 
			
		||||
#ifndef __OPENCV_NONFREE_GPU_HPP__
 | 
			
		||||
#define __OPENCV_NONFREE_GPU_HPP__
 | 
			
		||||
 | 
			
		||||
#include "opencv2/opencv_modules.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 | 
			
		||||
 | 
			
		||||
#include "opencv2/gpu/gpu.hpp"
 | 
			
		||||
#include "opencv2/core/gpumat.hpp"
 | 
			
		||||
 | 
			
		||||
namespace cv { namespace gpu {
 | 
			
		||||
 | 
			
		||||
@@ -129,6 +125,4 @@ public:
 | 
			
		||||
 | 
			
		||||
} // namespace cv
 | 
			
		||||
 | 
			
		||||
#endif // defined(HAVE_OPENCV_GPU)
 | 
			
		||||
 | 
			
		||||
#endif // __OPENCV_NONFREE_GPU_HPP__
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,9 @@
 | 
			
		||||
 | 
			
		||||
#include "perf_precomp.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
 | 
			
		||||
#include "cvconfig.h"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA) && !defined(DYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
 | 
			
		||||
#include "opencv2/ts/gpu_perf.hpp"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@
 | 
			
		||||
 | 
			
		||||
#include "opencv2/opencv_modules.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
 | 
			
		||||
#include "opencv2/gpu/device/common.hpp"
 | 
			
		||||
#include "opencv2/gpu/device/limits.hpp"
 | 
			
		||||
 
 | 
			
		||||
@@ -51,7 +51,7 @@
 | 
			
		||||
#include "opencv2/imgproc/imgproc.hpp"
 | 
			
		||||
#include "opencv2/core/internal.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
    #include "opencv2/nonfree/gpu.hpp"
 | 
			
		||||
 | 
			
		||||
    #if defined(HAVE_CUDA)
 | 
			
		||||
 
 | 
			
		||||
@@ -42,12 +42,10 @@
 | 
			
		||||
 | 
			
		||||
#include "precomp.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 | 
			
		||||
 | 
			
		||||
using namespace cv;
 | 
			
		||||
using namespace cv::gpu;
 | 
			
		||||
 | 
			
		||||
#if !defined (HAVE_CUDA)
 | 
			
		||||
#if !defined (HAVE_CUDA) || !defined(HAVE_OPENCV_GPU) || defined(DYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
 | 
			
		||||
cv::gpu::SURF_GPU::SURF_GPU() { throw_nogpu(); }
 | 
			
		||||
cv::gpu::SURF_GPU::SURF_GPU(double, int, int, bool, float, bool) { throw_nogpu(); }
 | 
			
		||||
@@ -421,5 +419,3 @@ void cv::gpu::SURF_GPU::releaseMemory()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // !defined (HAVE_CUDA)
 | 
			
		||||
 | 
			
		||||
#endif // defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,9 @@
 | 
			
		||||
 | 
			
		||||
#include "test_precomp.hpp"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
 | 
			
		||||
#include "cvconfig.h"
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA) && !defined(DYNAMIC_CUDA_SUPPORT)
 | 
			
		||||
 | 
			
		||||
using namespace cvtest;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user