BUG: fix #6105, if a directory inside CMAKE_FIND_ROOT_PATH is given to a
FIND_XXX() command, don't prepend the root to it (since it is already in this root) Alex
This commit is contained in:
parent
6c073ddb65
commit
9aeffa6e11
|
@ -536,8 +536,18 @@ void cmFindBase::HandleCMakeFindRootPath()
|
||||||
it != unrootedPaths.end();
|
it != unrootedPaths.end();
|
||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
std::string rootedDir=*rootIt;
|
// if the current directory is already inside the current root, don't
|
||||||
rootedDir+=*it;
|
// add the root again
|
||||||
|
std::string rootedDir;
|
||||||
|
if (cmSystemTools::IsSubDirectory(it->c_str(), rootIt->c_str()))
|
||||||
|
{
|
||||||
|
rootedDir = *it;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rootedDir=*rootIt;
|
||||||
|
rootedDir+=*it;
|
||||||
|
}
|
||||||
this->SearchPaths.push_back(rootedDir);
|
this->SearchPaths.push_back(rootedDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue