Merge pull request #1634 from alalek:cmake_fix_cuda_linker_deps

pull/1635/merge
Andrey Pavlenko 11 years ago committed by OpenCV Buildbot
commit 28ecd54f58
  1. 12
      CMakeLists.txt
  2. 2
      apps/CMakeLists.txt

@ -456,6 +456,18 @@ if(WITH_OPENCL)
include(cmake/OpenCVDetectOpenCL.cmake) include(cmake/OpenCVDetectOpenCL.cmake)
endif() endif()
# ----------------------------------------------------------------------------
# Add CUDA libraries (needed for apps/tools, samples)
# ----------------------------------------------------------------------------
if(HAVE_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: # Solution folders:
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------

@ -1,2 +1,4 @@
link_libraries(${OPENCV_LINKER_LIBS})
add_subdirectory(haartraining) add_subdirectory(haartraining)
add_subdirectory(traincascade) add_subdirectory(traincascade)

Loading…
Cancel
Save