From e6c5b9452a0e49d93e775169bb5bf63ea016df5e Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sat, 11 Feb 2012 18:04:26 +0100 Subject: [PATCH] fix FeatureSummary for REQUIRED packages, they were reported as OPTIONAL Alex --- Source/cmFindPackageCommand.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 7d3f09bda..22bb62897 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -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();