cuda: fix samples
authorAlexander Alekhin <alexander.alekhin@intel.com>
Thu, 19 Jan 2017 13:56:06 +0000 (16:56 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 23 Jan 2017 15:45:53 +0000 (18:45 +0300)
samples/gpu/CMakeLists.txt
samples/gpu/performance/CMakeLists.txt

index 8c97ea8..0f73467 100644 (file)
@@ -14,27 +14,19 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
   project("${project}_samples")
 
   ocv_include_modules_recurse(${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS})
-  ocv_include_directories(
-    "${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia"
-    "${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/core"
-    )
 
   if(HAVE_opencv_xfeatures2d)
-    ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/xfeatures2d/include")
+    ocv_include_modules_recurse(opencv_xfeatures2d)
   endif()
 
   if(HAVE_opencv_cudacodec)
-    ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/cudacodec/include")
+    ocv_include_modules_recurse(opencv_cudacodec)
   endif()
 
   if(HAVE_CUDA)
     ocv_include_directories(${CUDA_INCLUDE_DIRS})
   endif()
 
-  if(HAVE_OPENCL)
-    ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/ocl/include")
-  endif()
-
   if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
   endif()
index 9c9fb5b..2b1bf0b 100644 (file)
@@ -4,11 +4,11 @@ file(GLOB sources "performance/*.cpp")
 file(GLOB headers "performance/*.h")
 
 if(HAVE_opencv_xfeatures2d)
-  ocv_include_directories("${opencv_xfeatures2d_SOURCE_DIR}/include")
+  ocv_include_modules_recurse(opencv_xfeatures2d)
 endif()
 
 if(HAVE_opencv_bgsegm)
-  ocv_include_directories("${opencv_bgsegm_SOURCE_DIR}/include")
+  ocv_include_modules_recurse(opencv_bgsegm)
 endif()
 
 add_executable(${the_target} ${sources} ${headers})