Browse Source

BUG: fix unix path search

Bill Hoffman 24 years ago
parent
commit
d04756d8f7
1 changed files with 9 additions and 6 deletions
  1. 9 6
      Source/cmSystemTools.cxx

+ 9 - 6
Source/cmSystemTools.cxx

@@ -686,22 +686,25 @@ std::string cmSystemTools::FindLibrary(const char* name,
       {
       {
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       }
       }
-    tryPath = "lib";
-    tryPath += *p;
+    tryPath = *p;
+    tryPath += "/lib";
+    tryPath += name;
     tryPath + ".so";
     tryPath + ".so";
     if(cmSystemTools::FileExists(tryPath.c_str()))
     if(cmSystemTools::FileExists(tryPath.c_str()))
       {
       {
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       }
       }
-    tryPath = "lib";
-    tryPath += *p;
+    tryPath = *p;
+    tryPath = "/lib";
+    tryPath += name;
     tryPath + ".a";
     tryPath + ".a";
     if(cmSystemTools::FileExists(tryPath.c_str()))
     if(cmSystemTools::FileExists(tryPath.c_str()))
       {
       {
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       }
       }
-    tryPath = "lib";
-    tryPath += *p;
+    tryPath = *p;
+    tryPath = "/lib";
+    tryPath += name;
     tryPath + ".sl";
     tryPath + ".sl";
     if(cmSystemTools::FileExists(tryPath.c_str()))
     if(cmSystemTools::FileExists(tryPath.c_str()))
       {
       {