Merge topic 'FixFeatureSummaryForREQUIREDPackages'

e6c5b94 fix FeatureSummary for REQUIRED packages, they were reported as OPTIONAL
This commit is contained in:
David Cole 2012-02-14 16:17:07 -05:00 committed by CMake Topic Stage
commit 4fd13c0f15
1 changed files with 9 additions and 0 deletions

View File

@ -1226,6 +1226,15 @@ void cmFindPackageCommand::AppendSuccessInformation()
}
this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName.c_str(),
versionInfo.c_str());
if (this->Required)
{
std::string requiredInfoPropName = "_CMAKE_";
requiredInfoPropName += this->Name;
requiredInfoPropName += "_TYPE";
this->Makefile->GetCMakeInstance()->SetProperty(
requiredInfoPropName.c_str(), "REQUIRED");
}
// Restore original state of "_FIND_" variables we set.
this->RestoreFindDefinitions();