diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-05-17 17:14:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-05-17 17:16:07 +0400 |
commit | be03b735c53fc96e7d83bff61a00b8bf3c2f91b6 (patch) | |
tree | cb71304749c20acc50520bae295a64c37fbaee29 /intern | |
parent | ef2ba65b32916ed21ee2af8d3b5a558c7dcb262b (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_cuda.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp index e9140633e4a..e6510bfab2a 100644 --- a/intern/cycles/util/util_cuda.cpp +++ b/intern/cycles/util/util_cuda.cpp @@ -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; |