summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-04-06 15:56:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-04-06 15:56:04 (GMT)
commit5e0a796acc4e4b23149f33906c11a19eca76d769 (patch)
tree3c45d649f9c8ac220f6fb726679466c131e64feb /Source/cmMakefile.cxx
parent69da19a6a7c19dc8b52a510fc083759e4c494415 (diff)
downloadCMake-5e0a796acc4e4b23149f33906c11a19eca76d769.zip
CMake-5e0a796acc4e4b23149f33906c11a19eca76d769.tar.gz
CMake-5e0a796acc4e4b23149f33906c11a19eca76d769.tar.bz2
ENH: better fix for 64 bit, add 64 to the name of all directories in the search path
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index baf3b0b..1f5ed8a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2188,17 +2188,21 @@ std::string cmMakefile::FindLibrary(const char* name,
{
std::string voidsize = this->GetRequiredDefinition("CMAKE_SIZEOF_VOID_P");
int size = atoi(voidsize.c_str());
+ std::vector<std::string> path64;
if(size == 8)
{
- path.push_back("/usr/X11R6/lib64");
- path.push_back("/usr/local/lib64");
- path.push_back("/usr/lib64");
- }
- if(size == 4)
- {
- path.push_back("/usr/X11R6/lib32");
- path.push_back("/usr/local/lib32");
- path.push_back("/usr/lib32");
+ // add a 64 to the name of all the search paths
+ for(std::vector<std::string>::iterator i = path.begin();
+ i != path.end(); ++i)
+ {
+ std::string s = *i;
+ s += "64";
+ path64.push_back(s);
+ }
+ // now append the regular names
+ path64.insert(path64.end(), path.begin(), path.end());
+ // now look for the library in the 64 bit path
+ return cmSystemTools::FindLibrary(name, path64);
}
}
return cmSystemTools::FindLibrary(name, path);