In my project, I use below code to import cuda library
find_package(CUDAToolkit)
target_link_libraries(${target} PRIVATE CUDA::cudart)
target_link_libraries(${target} PRIVATE CUDA::cufft)
target_link_libraries(${target} PRIVATE CUDA::cublas)
It works well, and make rpm using cpack.
When I install the rpm package, it failed:
error: Failed dependencies:
libcublas.so.11()(64bit) is needed by hello-1.0.0-1.x86_64
libcublasLt.so.11()(64bit) is needed by hello-1.0.0-1.x86_64
libcudart.so.11.0()(64bit) is needed by hello-1.0.0-1.x86_64
libcufft.so.10()(64bit) is needed by hello-1.0.0-1.x86_64
I have installed cuda in /usr/local/cuda, and set path in /etc/ld.so.conf.d/cuda-11-4.conf.
Any idea? Thank you very mach!