Opencv build process keeps finding wrong version of CUDA

I have cuda 11.7 installed on my system, ubuntu 22.04. Trying to build OpenCV 4.6.0. when I run cmake-gui.configure the output it shows keeps pointing to 11.5, which is not on my system. tried using -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.7 to no avail. Is there some other flag to use?

Never mind folks. I found it.