fix for bug #3219 (undefined reference in GPU samples)
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 30 Aug 2013 10:46:47 +0000 (14:46 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 30 Aug 2013 10:46:47 +0000 (14:46 +0400)
samples/gpu/CMakeLists.txt

index fc10968..7219b76 100644 (file)
@@ -40,6 +40,11 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
     add_executable(${the_target} ${srcs})
 
     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()