Don't build CUDA modules stubs by default (use `-DBUILD_CUDA_STUBS=ON` if need them)
authorAndrey Pavlenko <andrey.pavlenko@itseez.com>
Mon, 16 Jun 2014 07:18:52 +0000 (11:18 +0400)
committerAndrey Pavlenko <andrey.pavlenko@itseez.com>
Mon, 16 Jun 2014 07:18:52 +0000 (11:18 +0400)
CMakeLists.txt
modules/cuda/CMakeLists.txt
modules/cudaarithm/CMakeLists.txt
modules/cudabgsegm/CMakeLists.txt
modules/cudacodec/CMakeLists.txt
modules/cudafeatures2d/CMakeLists.txt
modules/cudafilters/CMakeLists.txt
modules/cudaimgproc/CMakeLists.txt
modules/cudaoptflow/CMakeLists.txt
modules/cudastereo/CMakeLists.txt
modules/cudawarping/CMakeLists.txt

index 96f104a..5abf449 100644 (file)
@@ -175,6 +175,7 @@ OCV_OPTION(BUILD_WITH_STATIC_CRT    "Enables use of staticaly linked CRT for sta
 OCV_OPTION(BUILD_FAT_JAVA_LIB       "Create fat java wrapper containing the whole OpenCV library" ON IF NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
 OCV_OPTION(BUILD_ANDROID_SERVICE    "Build OpenCV Manager for Google Play" OFF IF ANDROID AND ANDROID_SOURCE_TREE )
 OCV_OPTION(BUILD_ANDROID_PACKAGE    "Build platform-specific package for Google Play" OFF IF ANDROID )
+OCV_OPTION(BUILD_CUDA_STUBS         "Build CUDA modules stubs when no CUDA SDK" OFF  IF (NOT IOS) )
 
 # 3rd party libs
 OCV_OPTION(BUILD_ZLIB               "Build zlib from source"             WIN32 OR APPLE )
index a79b7d3..389e90b 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cuda)
 endif()
 
index e3df9d2..c819ec9 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudaarithm)
 endif()
 
index 526e4b1..3a88282 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudabgsegm)
 endif()
 
index 30d95ba..ace7cb3 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS OR APPLE)
+if(IOS OR APPLE OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudacodec)
 endif()
 
index 69eba34..1db7462 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudafeatures2d)
 endif()
 
index 8589881..dfc814c 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudafilters)
 endif()
 
index 9617029..089135d 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudaimgproc)
 endif()
 
index 27dbc6a..b7a2109 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudaoptflow)
 endif()
 
index 6f63add..9f3d0f2 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudastereo)
 endif()
 
index a6b38f9..97f3e89 100644 (file)
@@ -1,4 +1,4 @@
-if(IOS)
+if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
   ocv_module_disable(cudawarping)
 endif()