Revert "Revert "Merge pull request #836 from jet47:gpu-modules""

This commit is contained in:
Vladislav Vinogradov
2013-06-04 13:32:35 +04:00
parent 10340fe234
commit 3eeaa9189c
472 changed files with 29894 additions and 23019 deletions

View File

@@ -16,8 +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)
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include")
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")
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
@@ -43,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
@@ -70,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()