summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-05-27 18:47:46 (GMT)
committerBrad King <brad.king@kitware.com>2008-05-27 18:47:46 (GMT)
commit41ceabb60ff38b828f3bbbf120734894a9f1e6dd (patch)
tree93f9913df0bac83b798ae9b0aee6eaf8f84e6304 /Source/cmFindBase.cxx
parentcea66664c561796665bdf2ae74d4b20859f9667d (diff)
downloadCMake-41ceabb60ff38b828f3bbbf120734894a9f1e6dd.zip
CMake-41ceabb60ff38b828f3bbbf120734894a9f1e6dd.tar.gz
CMake-41ceabb60ff38b828f3bbbf120734894a9f1e6dd.tar.bz2
BUG: Fix registry lookups for FIND commands to use view of target platform.
- See issue #7095.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index c4f380e..cff55ee 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -475,6 +475,21 @@ void cmFindBase::AddCMakeSystemVariables()
void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths)
{
+ // We should view the registry as the target application would view
+ // it.
+ cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_Default;
+ {
+ if(const char* psize =
+ this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+ {
+ switch(atoi(psize))
+ {
+ case 4: view = cmSystemTools::KeyWOW64_32; break;
+ case 8: view = cmSystemTools::KeyWOW64_64; break;
+ default: break;
+ }
+ }
+ }
std::vector<std::string> finalPath;
std::vector<std::string>::iterator i;
// glob and expand registry stuff from paths and put
@@ -482,7 +497,7 @@ void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths)
for(i = paths.begin();
i != paths.end(); ++i)
{
- cmSystemTools::ExpandRegistryValues(*i);
+ cmSystemTools::ExpandRegistryValues(*i, view);
cmSystemTools::GlobDirs(i->c_str(), finalPath);
}
// clear the path