Search for library instead of header files in build script
ViliamVadocz opened this issue · comments
The build script currently searches for cuda.h
instead of libcuda.so
on Linux and cuda.lib
on Windows. The location of the header might not be indicative of the library location. The header is not needed, but the library is.
You could do something similar to the build script in nvidia-video-codec-sdk
: https://github.com/ViliamVadocz/nvidia-video-codec-sdk/blob/master/build.rs
Having the search for the library in a separate crate like https://github.com/Rust-GPU/Rust-CUDA/tree/8a6cb734d21d5582052fa5b38089d1aa0f4d582f/crates/find_cuda_helper is quite nice, as it then can also be used in other projects, so that not everyone has to implement their own logic.