问题是:
CMake Warning at cmake/OpenCVFindLibsPerf.cmake:45 (message): OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA). CUDA support will be disabled in OpenCV build. To eliminate this warning remove WITH_CUDA=ON CMake configuration option. Call Stack (most recent call first): CMakeLists.txt:777 (include)
解决办法是在Opencv的CMAKELSIT.TXT里改一下这一行:
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
改为
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()