Fix find_package for cmake-gui registry entry
The find_package commands looks at the "WhereBuild" registry entries created by CMakeSetup and cmake-gui hoping that the project was recently built. CMakeSetup created WhereBuild1..WhereBuild10 but cmake-gui creates WhereBuild0-WhereBuild9. This fixes find_package to look at WhereBuild0 so that the most recently configured project can be found. It is important in the case that the package to be found was the last one configured in cmake-gui but the current project that is finding it is configured from the command line.
This commit is contained in:
parent
b592154bfd
commit
be24db77d0
|
@ -1137,7 +1137,7 @@ void cmFindPackageCommand::AddPrefixesBuilds()
|
|||
if(!this->NoBuilds && !this->NoDefaultPath)
|
||||
{
|
||||
// It is likely that CMake will have recently built the project.
|
||||
for(int i=1; i <= 10; ++i)
|
||||
for(int i=0; i <= 10; ++i)
|
||||
{
|
||||
cmOStringStream r;
|
||||
r <<
|
||||
|
|
Loading…
Reference in New Issue