CMake Error: The following variables in CUDA_cublas_LIBRARY are NOTFOUND while compiling opencv in windows

Hi, Im trying to install OpenCV 4.5.2 in windows 10 and compiling it with the newest CMake version 3.21.0 and have CUDA 10.2 and Visual Studio 2017 and Python 3 on the system, but after configuring done, this error occurred during generation:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudev
    linked by target "opencv_test_cudev" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudev/test
    linked by target "opencv_core" in directory E:/software/opencv/sources/modules/core
    linked by target "opencv_test_core" in directory E:/software/opencv/sources/modules/core
    linked by target "opencv_perf_core" in directory E:/software/opencv/sources/modules/core
    linked by target "opencv_cudaarithm" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaarithm
    linked by target "opencv_test_cudaarithm" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaarithm
    linked by target "opencv_perf_cudaarithm" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaarithm
    linked by target "opencv_flann" in directory E:/software/opencv/sources/modules/flann
    linked by target "opencv_test_flann" in directory E:/software/opencv/sources/modules/flann
    linked by target "opencv_hdf" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/hdf
    linked by target "opencv_test_hdf" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/hdf
    linked by target "opencv_perf_imgproc" in directory E:/software/opencv/sources/modules/imgproc
    linked by target "opencv_imgproc" in directory E:/software/opencv/sources/modules/imgproc
    linked by target "opencv_test_imgproc" in directory E:/software/opencv/sources/modules/imgproc
    linked by target "opencv_intensity_transform" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/intensity_transform
    linked by target "opencv_test_intensity_transform" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/intensity_transform
    linked by target "opencv_ml" in directory E:/software/opencv/sources/modules/ml
    linked by target "opencv_test_ml" in directory E:/software/opencv/sources/modules/ml
    linked by target "opencv_phase_unwrapping" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/phase_unwrapping
    linked by target "opencv_test_phase_unwrapping" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/phase_unwrapping
    linked by target "opencv_plot" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/plot
    linked by target "opencv_quality" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/quality
    linked by target "opencv_test_quality" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/quality
    linked by target "opencv_reg" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/reg
    linked by target "opencv_test_reg" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/reg
    linked by target "opencv_perf_reg" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/reg
    linked by target "opencv_surface_matching" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/surface_matching
    linked by target "opencv_cudafilters" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudafilters
    linked by target "opencv_test_cudafilters" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudafilters
    linked by target "opencv_perf_cudafilters" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudafilters
    linked by target "opencv_cudaimgproc" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaimgproc
    linked by target "opencv_test_cudaimgproc" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaimgproc
    linked by target "opencv_perf_cudaimgproc" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudaimgproc
    linked by target "opencv_cudawarping" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudawarping
    linked by target "opencv_test_cudawarping" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudawarping
    linked by target "opencv_perf_cudawarping" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/cudawarping
    linked by target "opencv_dnn" in directory E:/software/opencv/sources/modules/dnn
    linked by target "opencv_test_dnn" in directory E:/software/opencv/sources/modules/dnn
    linked by target "opencv_perf_dnn" in directory E:/software/opencv/sources/modules/dnn
    linked by target "opencv_dnn_superres" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/dnn_superres
    linked by target "opencv_test_dnn_superres" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/dnn_superres
    linked by target "opencv_perf_dnn_superres" in directory E:/software/opencv_contrib-master/opencv_contrib-master/modules/dnn_superres
    linked by target "opencv_features2d" in directory E:/software/opencv/sources/modules/features2d
.
.
.

(and its addressed different modules which havent paste here…)
thank you if help me please

I’ve fixed post’s formatting and tags. opencv is a very useless tag in this forum. tags are optional.

you should post the whole output. you don’t have the knowledge to know what to omit.

thank you very much for formatting, Im new here.
thats right and thanks for this point, this is my complete error:

https://github.com/foruhari/Compiling-opencv-in-windows/files/6734406/CMake_error.txt