summaryrefslogtreecommitdiffstats
path: root/Source/cmFindLibraryCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-23 17:34:23 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-23 17:34:23 (GMT)
commit5fd54d79466f737409763f1c888abc23d50ade9d (patch)
tree89c28b145047ba6614dbf203af379dc30ea6c903 /Source/cmFindLibraryCommand.cxx
parent5740f2cbb879836bcedfde59d68604da45b25a47 (diff)
downloadCMake-5fd54d79466f737409763f1c888abc23d50ade9d.zip
CMake-5fd54d79466f737409763f1c888abc23d50ade9d.tar.gz
CMake-5fd54d79466f737409763f1c888abc23d50ade9d.tar.bz2
BUG: Fix lib/ to lib/64/ search path conversion
Automatic generation of 64-bit library search paths must preserve trailing slashes. This fixes a failure case exposed by the recent rewrite of find_library, which assumes trailing slashes occur on all search paths.
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r--Source/cmFindLibraryCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index b81a5bf..78244ce 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -182,6 +182,7 @@ void cmFindLibraryCommand::AddLib64Paths()
cmSystemTools::ReplaceString(s, "lib/", "lib64/");
// try to replace lib with lib64 and see if it is there,
// then prepend it to the path
+ // Note that all paths have trailing slashes.
if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str()))
{
path64.push_back(s);
@@ -189,7 +190,7 @@ void cmFindLibraryCommand::AddLib64Paths()
}
// now just add a 64 to the path name and if it is there,
// add it to the path
- s2 += "64";
+ s2 += "64/";
if(cmSystemTools::FileIsDirectory(s2.c_str()))
{
found64 = true;