use singe_cuda_find::{emit_rerun_if_env_changed, find_cuda_runtime, find_cusparse};
fn main() {
println!("cargo:rerun-if-changed=build.rs");
emit_rerun_if_env_changed();
link_libraries();
}
fn link_libraries() {
if let Ok(Some(cudart)) = find_cuda_runtime() {
println!("cargo:rustc-link-search={}", cudart.library_path.display());
println!("cargo:rustc-link-lib=static=cudart_static");
println!("cargo:include={}", cudart.include_path.display());
}
if let Ok(Some(cusparse)) = find_cusparse() {
println!(
"cargo:rustc-link-search={}",
cusparse.library_path.display(),
);
println!("cargo:rustc-link-lib=cusparse");
}
}