Building OpenCV with CUDA with VS2022 and GTX 760


I’ve tried to build OpenCV 4.8 with CUDA in Visual Studio 2022 Community using cmake-gui but failed and I can’t see any chance to get it done. The problems are:

my GPU is a GTX 760 and the newest windows driver I can get for it is something like 475, but CUDA Toolkit 12 needs a driver version of 5xx. The Version 536.25 that comes along with CUDA Toolkit supports for example GTX 750 GPUs but for some reason that I don’t know it doesn’t support my GTX 760.

The latest CUDA Toolkit version I know that supports my graphic driver is 11.4. But this one doesn’t support VS2022, only 17 and 19.

Can anyone provide me a solution please how I can get GPU support in OpenCV with GTX760 and VS2022 please without advising me to buy a newer GPU or to use an older VS? I would also ask for an understandable solution because I struggle with makefiles, configurations, flags and stuff. I don’t even know how to set the nvcc flags within my VS projects.