From d04756d8f7096ce6a6f019fcc26be431a226dc6e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 10 May 2001 15:50:03 -0400 Subject: [PATCH] BUG: fix unix path search --- Source/cmSystemTools.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2240424e1..1938c0e02 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -686,22 +686,25 @@ std::string cmSystemTools::FindLibrary(const char* name, { return cmSystemTools::CollapseFullPath(tryPath.c_str()); } - tryPath = "lib"; - tryPath += *p; + tryPath = *p; + tryPath += "/lib"; + tryPath += name; tryPath + ".so"; if(cmSystemTools::FileExists(tryPath.c_str())) { return cmSystemTools::CollapseFullPath(tryPath.c_str()); } - tryPath = "lib"; - tryPath += *p; + tryPath = *p; + tryPath = "/lib"; + tryPath += name; tryPath + ".a"; if(cmSystemTools::FileExists(tryPath.c_str())) { return cmSystemTools::CollapseFullPath(tryPath.c_str()); } - tryPath = "lib"; - tryPath += *p; + tryPath = *p; + tryPath = "/lib"; + tryPath += name; tryPath + ".sl"; if(cmSystemTools::FileExists(tryPath.c_str())) {