@@ -48,8 +48,11 @@ struct Config {
4848 glew_dir : String ,
4949 glfw_dir : String ,
5050 boost_dir : String ,
51+ 52+ // GPU backends
5153 cuda_sdk : String ,
5254 opencl_sdk : String ,
55+ sdk_lib_dir : String ,
5356}
5457
5558macro_rules! t {
@@ -348,16 +351,16 @@ fn blob_backends(conf: &Config, build_dir: &std::path::PathBuf) -> (Vec<String>,
348351 backend_dirs. push ( format ! ( "{}\\ lib\\ x64" , conf. cuda_sdk) ) ;
349352 backend_dirs. push ( format ! ( "{}\\ nvvm\\ lib\\ x64" , conf. cuda_sdk) ) ;
350353 } else {
351- backend_dirs. push ( format ! ( "{}/lib64 " , conf. cuda_sdk) ) ;
352- backend_dirs. push ( format ! ( "{}/nvvm/lib64 " , conf. cuda_sdk) ) ;
354+ backend_dirs. push ( format ! ( "{}/{} " , conf. cuda_sdk, conf . sdk_lib_dir ) ) ;
355+ backend_dirs. push ( format ! ( "{}/nvvm/{} " , conf. cuda_sdk, conf . sdk_lib_dir ) ) ;
353356 }
354357 } else if conf. use_backend == "opencl" {
355358 backends. push ( ( "afopencl" . to_string ( ) ) ) ;
356359 backends. push ( "OpenCL" . to_string ( ) ) ;
357360 if cfg ! ( windows) {
358361 backend_dirs. push ( format ! ( "{}\\ lib\\ x64" , conf. opencl_sdk) ) ;
359362 } else {
360- backend_dirs. push ( format ! ( "{}/lib64 " , conf. opencl_sdk) ) ;
363+ backend_dirs. push ( format ! ( "{}/{} " , conf. opencl_sdk, conf . sdk_lib_dir ) ) ;
361364 }
362365 }
363366
0 commit comments