use CMake's FindCUDA()
CMake provides a module 'FindCUDA()'. This should be used instead of some home-made code.
There is at least the following issues with the current code in CMakeList.txt:
- libcuda is not found. This library is in the 'stubs' directory of the library directory. $CUDA_TOOLKIT_ROOT_DIR/lib64/stubs