Fix T39757: missing cuda libary on linx, now also try to find libcuda.so.1.

I'm not sure this should be needed, but some particular systems don't have
libcuda.so so we do this now.
This commit is contained in:
Brecht Van Lommel 2014-05-17 15:14:20 +02:00
parent ef2ba65b32
commit be03b735c5

@ -180,16 +180,22 @@ bool cuLibraryInit()
#ifdef _WIN32
/* expected in c:/windows/system or similar, no path needed */
const char *path = "nvcuda.dll";
const char *alternative_path = NULL;
#elif defined(__APPLE__)
/* default installation path */
const char *path = "/usr/local/cuda/lib/libcuda.dylib";
const char *alternative_path = NULL;
#else
const char *path = "libcuda.so";
const char *alternative_path = "libcuda.so.1";
#endif
/* load library */
DynamicLibrary *lib = dynamic_library_open(path);
if(lib == NULL && alternative_path)
lib = dynamic_library_open(path);
if(lib == NULL)
return false;