|
|
|
@ -16,16 +16,17 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/include")#for opencv.hpp |
|
|
|
|
ocv_include_modules(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS}) |
|
|
|
|
|
|
|
|
|
if(HAVE_opencv_gpu) |
|
|
|
|
if(HAVE_opencv_gpuoptflow) |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuoptflow/include") |
|
|
|
|
endif() |
|
|
|
|
if(HAVE_opencv_gpuimgproc) |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuimgproc/include") |
|
|
|
|
endif() |
|
|
|
|
if(HAVE_opencv_gpuarithm) |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuarithm/include") |
|
|
|
|
endif() |
|
|
|
|
if(HAVE_opencv_gpufilters) |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpufilters/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuwarping/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuimgproc/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpufeatures2d/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpuoptflow/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpubgsegm/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpustereo/include") |
|
|
|
|
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS) |
|
|
|
@ -51,8 +52,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) |
|
|
|
|
add_executable(${the_target} ${srcs}) |
|
|
|
|
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS}) |
|
|
|
|
|
|
|
|
|
if(HAVE_opencv_gpu) |
|
|
|
|
target_link_libraries(${the_target} opencv_gpu) |
|
|
|
|
if("${srcs}" MATCHES "gpu/") |
|
|
|
|
target_link_libraries(${the_target} opencv_gpuarithm opencv_gpufilters) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
set_target_properties(${the_target} PROPERTIES |
|
|
|
@ -78,7 +79,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) |
|
|
|
|
ocv_list_filterout(cpp_samples Qt_sample) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(NOT HAVE_opencv_gpu) |
|
|
|
|
if(NOT HAVE_opencv_gpuarithm OR NOT HAVE_opencv_gpufilters) |
|
|
|
|
ocv_list_filterout(cpp_samples "/gpu/") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|