CUDA dependency in nonfree nodule removed. OpenCV.mk generation fixed.
authorAlexander Smorkalov <alexander.smorkalov@itseez.com>
Fri, 27 Dec 2013 07:18:10 +0000 (11:18 +0400)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Fri, 27 Dec 2013 07:18:10 +0000 (11:18 +0400)
cmake/OpenCVGenAndroidMK.cmake
modules/nonfree/CMakeLists.txt
modules/nonfree/include/opencv2/nonfree/gpu.hpp
modules/nonfree/src/cuda/surf.cu
modules/nonfree/src/precomp.hpp
modules/nonfree/src/surf_gpu.cpp
modules/stitching/include/opencv2/stitching/detail/matchers.hpp

index 8792d1b..eed4765 100644 (file)
@@ -70,7 +70,9 @@ if(ANDROID)
   endif()
 
   # GPU module enabled separately
-  list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE "gpu")
+  list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE "opencv_gpu")
+  list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE "opencv_dynamicuda")
+
   if(HAVE_opencv_gpu)
     set(OPENCV_HAVE_GPU_MODULE_CONFIGMAKE "on")
   endif()
index 5689a12..d5c5562 100644 (file)
@@ -4,4 +4,9 @@ endif()
 
 set(the_description "Functionality with possible limitations on the use")
 ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
-ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl)
+if (ENABLE_DYNAMIC_CUDA)
+  set(HAVE_CUDA FALSE)
+  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()
\ No newline at end of file
index 3cb0b47..c8730fb 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "opencv2/opencv_modules.hpp"
 
-#if defined(HAVE_OPENCV_GPU)
+#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 
 #include "opencv2/gpu/gpu.hpp"
 
index 2002f53..df5905d 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "opencv2/opencv_modules.hpp"
 
-#ifdef HAVE_OPENCV_GPU
+#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 
 #include "opencv2/gpu/device/common.hpp"
 #include "opencv2/gpu/device/limits.hpp"
index 5fbe446..0d2e180 100644 (file)
@@ -51,7 +51,7 @@
 #include "opencv2/imgproc/imgproc.hpp"
 #include "opencv2/core/internal.hpp"
 
-#if defined(HAVE_OPENCV_GPU)
+#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
     #include "opencv2/nonfree/gpu.hpp"
 
     #if defined(HAVE_CUDA)
index bfc7e70..e0cf6ff 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "precomp.hpp"
 
-#if defined(HAVE_OPENCV_GPU)
+#if defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 
 using namespace cv;
 using namespace cv::gpu;
@@ -422,4 +422,4 @@ void cv::gpu::SURF_GPU::releaseMemory()
 
 #endif // !defined (HAVE_CUDA)
 
-#endif // defined(HAVE_OPENCV_GPU)
+#endif // defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
index 108cd0f..36f80f4 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "opencv2/opencv_modules.hpp"
 
-#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU)
+#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
     #include "opencv2/nonfree/gpu.hpp"
 #endif
 
@@ -104,7 +104,7 @@ private:
 };
 
 
-#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU)
+#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
 class CV_EXPORTS SurfFeaturesFinderGpu : public FeaturesFinder
 {
 public: