Project needs CUDA Toolkit

Hi, I am trying to build a CUDA C/C++ git project with CMake so that I can run it on’s T4 GPU.

I have managed to get the project running on a local machine that houses an RTX 2060, but the issue I run into when trying to build it in a studio is the following:

⚡ main ~/imhd-CUDA/build cmake ../src -DCMAKE_PREFIX_PATH=/usr/local/cuda-12.1 -DCUDA_Toolkit_DIR=/usr/local/cuda-12.1
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "FindCUDAToolkit.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "CUDAToolkit", but CMake did not find one.

  Could not find a package configuration file provided by "CUDAToolkit" with
  any of the following names:


  Add the installation prefix of "CUDAToolkit" to CMAKE_PREFIX_PATH or set
  "CUDAToolkit_DIR" to a directory containing one of the above files.  If
  "CUDAToolkit" provides a separate development package or SDK, be sure it
  has been installed.

Which is based on this line from the CMakeLists.txt file: find_package(CUDAToolkit REQUIRED).

I have tried installing the toolkit, but it has failed, I imagine because does not want its users to be able to install packages. What do I do here? Is there a way that could install the toolkit themselves so that my project can find it? Or, if that’s not possible, is there a workaround that I can modify into my build files so that I can build the project, and run it here?

I really need to be able to use these GPUs right now, my local machine has run into issues and does not currently post.

Solved by changing find_package(CUDAToolkit REQUIRED) to find_package(CUDA REQUIRED)