summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 8b54a91..9321708 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -378,12 +378,19 @@ void cmFindBase::AddFindPrefix(std::vector<std::string>& dest,
{
dir += "/";
}
- dest.push_back(dir + subdir);
+ if(subdir != "/")
+ {
+ std::string add = dir + subdir;
+ if(add != "/")
+ {
+ dest.push_back(add);
+ }
+ }
if (subdir == "bin")
{
dest.push_back(dir + "sbin");
}
- if(!subdir.empty())
+ if(!subdir.empty() && *it != "/")
{
dest.push_back(*it);
}