Not able to link to latest cuda version installed in the system

In my system I have following cuda version installed. To install Maxine Video Effects we need to use cuda version 11.1.

ubuntu@ip-172-31-7-189:/usr/local/VideoFX$ ls -lrth …/
total 68K
drwxr-xr-x 11 root root 4.0K Dec 11 05:00 TensorRT-7.2.2.3
drwxr-xr-x 2 root root 4.0K Feb 24 17:30 src
drwxr-xr-x 2 root root 4.0K Feb 24 17:30 sbin
drwxr-xr-x 2 root root 4.0K Feb 24 17:30 games
lrwxrwxrwx 1 root root 9 Feb 24 17:30 man → share/man
drwxr-xr-x 5 root root 4.0K Apr 14 00:35 VideoFX
drwxr-xr-x 3 root root 4.0K Apr 22 17:39 etc
drwxr-xr-x 4 root root 4.0K Apr 22 17:39 init
drwxr-xr-x 19 root root 4.0K Apr 22 18:38 cuda-11.1
drwxr-xr-x 25 root root 4.0K Apr 22 18:43 cuda-11.0
drwxr-xr-x 19 root root 4.0K Apr 22 18:45 cuda-10.1
drwxr-xr-x 20 root root 4.0K Apr 22 18:48 cuda-10.2
drwxr-xr-x 3 root root 4.0K Apr 22 18:51 dcgm
drwxr-xr-x 12 root root 4.0K Apr 22 18:54 share
drwxr-xr-x 3 root root 4.0K Apr 22 18:54 include
drwxr-xr-x 6 root root 4.0K Apr 22 18:54 lib
drwxr-xr-x 3 root root 4.0K Apr 23 17:40 bin
drwxr-xr-x 22 root root 4.0K May 8 11:45 cuda-10.0
lrwxrwxrwx 1 root root 20 May 8 12:41 cuda → /usr/local/cuda-11.1

But when I run build_samples.sh from /usr/local/VideoFX/share to setup Video effects I am getting below error:

Install to [~/mysamples]:
========== copy samples to /home/ubuntu/mysamples ==========
========== check prerequisities ==========
Required packages are already installed
========== verify cuda / cudnn / tensorrt ==========
========== build sample apps ==========
– VideoFX_LIB: /usr/local/VideoFX/lib/libVideoFX.so
– SDK_INCLUDES_PATH: /usr/local/VideoFX/include
– NVCVImage_LIB: /usr/local/VideoFX/lib/libNVCVImage.so
– NVCVImage_INCLUDES_PATH: /usr/local/VideoFX/include
OpenCV_INCLUDE_DIRS /usr/local/include/opencv4
OpenCV_LIBRARIES opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
OpenCV_LIBS opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
CMake Error at /usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find CUDA: Found unsuitable version “10.0”, but required is at
least “11.1” (found /usr/local/cuda)
Call Stack (most recent call first):
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:456 (_FPHSA_FAILURE_MESSAGE)
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindCUDA.cmake:1119 (find_package_handle_standard_args)
samples/external/CMakeLists.txt:43 (find_package)

Note: earlier /usr/local/cuda was linked to cuda-10.0. I changed the linking to cuda-11.1 but still the same issue.