fixed find package CUDA for cross-compilation

replaced find_host_package with find_package and
set CMAKE_FIND_ROOT_PATH_MODE_LIBRARY to BOTH, because NEVER 
doesn't work for CUDA_CUDA_LIBRARY, which is located in 
/usr/arm-linux-gnueabihf/lib/libcuda.so for ARM
pull/1714/head
Vladislav Vinogradov 11 years ago
parent 957c85e9c4
commit 5e75a22559
  1. 6
      cmake/OpenCVDetectCUDA.cmake

@ -15,7 +15,11 @@ endif()
set(CMAKE_MODULE_PATH "${OpenCV_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_host_package(CUDA 4.2 QUIET)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
find_package(CUDA 4.2 QUIET)
if(CUDA_FOUND)
set(HAVE_CUDA 1)

Loading…
Cancel
Save