fix to properly handle Fedora library paths

metadata
Wenzel Jakob 2013-04-02 13:26:49 -04:00
parent 9f96f09e5f
commit c6c92a7d98
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,8 @@ FileResolver::FileResolver() {
dladdr((const void *) &dummySymbol, &info);
if (info.dli_fname) {
/* Try to detect a few default setups */
if (boost::starts_with(info.dli_fname, "/usr/lib")) {
if (boost::starts_with(info.dli_fname, "/usr/lib") ||
boost::starts_with(info.dli_name, "/lib")) {
basePath = fs::path("/usr/share/mitsuba");
} else if (boost::starts_with(info.dli_fname, "/usr/local/lib")) {
basePath = fs::path("/usr/local/share/mitsuba");