From 4b7c0b9c76cf201172ab66cf77f9cdbf6fb9c586 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 19 Jan 2017 16:56:06 +0300 Subject: [PATCH] cuda: fix samples --- samples/gpu/CMakeLists.txt | 12 ++---------- samples/gpu/performance/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 8c97ea865a..0f734677be 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -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() diff --git a/samples/gpu/performance/CMakeLists.txt b/samples/gpu/performance/CMakeLists.txt index 9c9fb5b676..2b1bf0be6b 100644 --- a/samples/gpu/performance/CMakeLists.txt +++ b/samples/gpu/performance/CMakeLists.txt @@ -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})