使用CUDA配置openCV时发生Cmake错误

使用CUDA配置openCV时发生Cmake错误,opencv,Opencv,Cmake在使用CUDA配置openCV时显示此错误: CMake错误:此项目中使用了以下变量,但它们被设置为NOTFOUND。 请设置或确保在CMake文件中正确设置和测试: opencv_dep_CUDA_cufft_LIBRARY linked by target "opencv_core" in directory C:/opencv/sources/modules/core linked by target "opencv_test_core" in directory

Cmake在使用CUDA配置openCV时显示此错误:

CMake错误:此项目中使用了以下变量,但它们被设置为NOTFOUND。 请设置或确保在CMake文件中正确设置和测试:

opencv_dep_CUDA_cufft_LIBRARY
    linked by target "opencv_core" in directory C:/opencv/sources/modules/core
    linked by target "opencv_test_core" in directory C:/opencv/sources/modules/core
    linked by target "opencv_perf_core" in directory C:/opencv/sources/modules/core
    linked by target "opencv_flann" in directory C:/opencv/sources/modules/flann
    linked by target "opencv_test_flann" in directory C:/opencv/sources/modules/flann
    linked by target "opencv_imgproc" in directory C:/opencv/sources/modules/imgproc
    linked by target "opencv_test_imgproc" in directory C:/opencv/sources/modules/imgproc
    linked by target "opencv_perf_imgproc" in directory C:/opencv/sources/modules/imgproc
    linked by target "opencv_highgui" in directory C:/opencv/sources/modules/highgui
    linked by target "opencv_test_highgui" in directory C:/opencv/sources/modules/highgui
    linked by target "opencv_perf_highgui" in directory C:/opencv/sources/modules/highgui
    linked by target "opencv_test_features2d" in directory C:/opencv/sources/modules/features2d
    linked by target "opencv_features2d" in directory C:/opencv/sources/modules/features2d
    linked by target "opencv_perf_features2d" in directory C:/opencv/sources/modules/features2d
    linked by target "opencv_calib3d" in directory C:/opencv/sources/modules/calib3d
    linked by target "opencv_test_calib3d" in directory C:/opencv/sources/modules/calib3d
    linked by target "opencv_perf_calib3d" in directory C:/opencv/sources/modules/calib3d
    linked by target "opencv_test_ml" in directory C:/opencv/sources/modules/ml
    linked by target "opencv_ml" in directory C:/opencv/sources/modules/ml
    linked by target "opencv_test_video" in directory C:/opencv/sources/modules/video
    linked by target "opencv_video" in directory C:/opencv/sources/modules/video
    linked by target "opencv_perf_video" in directory C:/opencv/sources/modules/video
    linked by target "opencv_test_legacy" in directory C:/opencv/sources/modules/legacy
    linked by target "opencv_legacy" in directory C:/opencv/sources/modules/legacy
    linked by target "opencv_perf_objdetect" in directory C:/opencv/sources/modules/objdetect
    linked by target "opencv_objdetect" in directory C:/opencv/sources/modules/objdetect
    linked by target "opencv_test_objdetect" in directory C:/opencv/sources/modules/objdetect
    linked by target "opencv_perf_photo" in directory C:/opencv/sources/modules/photo
    linked by target "opencv_photo" in directory C:/opencv/sources/modules/photo
    linked by target "opencv_test_photo" in directory C:/opencv/sources/modules/photo
    linked by target "opencv_perf_gpu" in directory C:/opencv/sources/modules/gpu

我在没有openCV otheriwse的情况下使用CUDA。

解决方案是选择Visual Studio 11 Win64而不是Visual Studio 11作为CMAKE中的生成器。这将导致干净的配置。

当CMake提示输入编译器时,选择Visual Studio Win 64版本。cuft.lib应位于CUDA/vX.x/lib/x64文件夹中

那么,你有没有试着将这个变量设置为cufft库的路径?@Drop我问它,因为我不知道这是怎么做到的?请帮帮我