Implicit linkage with CUDA runtime reverted.
authorAlexander Smorkalov <alexander.smorkalov@itseez.com>
Fri, 21 Mar 2014 13:58:59 +0000 (17:58 +0400)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Fri, 21 Mar 2014 13:58:59 +0000 (17:58 +0400)
CMakeLists.txt

index 747d207..b610ecf 100644 (file)
@@ -512,6 +512,16 @@ if(NOT HAVE_CUDA)
   set(ENABLE_DYNAMIC_CUDA OFF)
 endif()
 
+if(HAVE_CUDA AND NOT ENABLE_DYNAMIC_CUDA)
+  set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
+  if(HAVE_CUBLAS)
+    set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cublas_LIBRARY})
+  endif()
+  if(HAVE_CUFFT)
+    set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
+  endif()
+endif()
+
 # ----------------------------------------------------------------------------
 # Solution folders:
 # ----------------------------------------------------------------------------