From c1dd38cbff27957bba22571bdd62b0ece381b37b Mon Sep 17 00:00:00 2001 From: Changlin Hsieh Date: Wed, 14 Aug 2013 16:16:03 +0800 Subject: [PATCH 1/2] Fix GPU example build failed with cuda 5.5 --- samples/gpu/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 85bee50585..8d14e15469 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -36,7 +36,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) set(the_target "example_${project}_${name}") add_executable(${the_target} ${srcs}) - target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS}) + target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS} cuda) if(HAVE_opencv_nonfree) target_link_libraries(${the_target} opencv_nonfree) endif() From 723ba29660d1013c24bb0ed5302af41d3440a48c Mon Sep 17 00:00:00 2001 From: Changlin Hsieh Date: Fri, 23 Aug 2013 16:05:35 +0800 Subject: [PATCH 2/2] Update cmake files by using CUDA_CUDA_LIBRARIES --- samples/gpu/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 8d14e15469..0f03fc3f6b 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -36,7 +36,12 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) set(the_target "example_${project}_${name}") add_executable(${the_target} ${srcs}) - target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS} cuda) + target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS}) + + if(HAVE_CUDA) + target_link_libraries(${the_target} ${CUDA_CUDA_LIBRARY}) + endif() + if(HAVE_opencv_nonfree) target_link_libraries(${the_target} opencv_nonfree) endif()