From 5c66ce7f29976bc6307b5a7191f040fa7337e437 Mon Sep 17 00:00:00 2001 From: whizzzkid Date: Wed, 28 Feb 2018 13:22:58 -0700 Subject: [PATCH] cuda: fixes gpu samples build (issue 10953) --- samples/gpu/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 8b35e7c37e..e3070bb0e6 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -50,6 +50,9 @@ endif() foreach(sample_filename ${all_samples}) ocv_define_sample(tgt ${sample_filename} gpu) ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS}) + if(HAVE_CUDA AND NOT ANDROID) + ocv_target_link_libraries(${tgt} ${CUDA_CUDA_LIBRARY}) + endif() if(HAVE_opencv_xfeatures2d) ocv_target_link_libraries(${tgt} opencv_xfeatures2d) endif()