1、主要参考博客:https://blog.csdn.net/fengxinzioo/article/details/109402921和https://blog.csdn.net/caojinpei123/article/details/107569394
2、遇到CMake Error: CUDA_nppi_LIBRARY (ADVANCED)问题,查找了很多解决方案
如:https://blog.csdn.net/u014613745/article/details/78310916和https://blog.csdn.net/dawn_chen121/article/details/82828629
3、最终查找到问题是所用的cmake版本太低了,原来用的是3.9.3,换成3.13.3后编译通过。记录至此,希望对你有所帮助!
4、附OpenCV下载地址:https://github.com/opencv/opencv/releases
5、附OpenCV_Contrib下载地址:https://github.com/opencv/opencv_contrib/releases
6、编译好的opencv4.5:
https://download.csdn.net/download/qq_38589460/15385100