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.
This commit is contained in:
parent
5740f2cbb8
commit
5fd54d7946
|
@ -182,6 +182,7 @@ void cmFindLibraryCommand::AddLib64Paths()
|
||||||
cmSystemTools::ReplaceString(s, "lib/", "lib64/");
|
cmSystemTools::ReplaceString(s, "lib/", "lib64/");
|
||||||
// try to replace lib with lib64 and see if it is there,
|
// try to replace lib with lib64 and see if it is there,
|
||||||
// then prepend it to the path
|
// then prepend it to the path
|
||||||
|
// Note that all paths have trailing slashes.
|
||||||
if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str()))
|
if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str()))
|
||||||
{
|
{
|
||||||
path64.push_back(s);
|
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,
|
// now just add a 64 to the path name and if it is there,
|
||||||
// add it to the path
|
// add it to the path
|
||||||
s2 += "64";
|
s2 += "64/";
|
||||||
if(cmSystemTools::FileIsDirectory(s2.c_str()))
|
if(cmSystemTools::FileIsDirectory(s2.c_str()))
|
||||||
{
|
{
|
||||||
found64 = true;
|
found64 = true;
|
||||||
|
|
Loading…
Reference in New Issue