summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-02-11 17:04:26 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-02-11 17:04:26 (GMT)
commite6c5b9452a0e49d93e775169bb5bf63ea016df5e (patch)
treed696d489bb0a565a59046bed9a523210f9d5017e /Source/cmFindPackageCommand.cxx
parent677047dda0620fa675bcc1a8bacde5388ad954c3 (diff)
downloadCMake-e6c5b9452a0e49d93e775169bb5bf63ea016df5e.zip
CMake-e6c5b9452a0e49d93e775169bb5bf63ea016df5e.tar.gz
CMake-e6c5b9452a0e49d93e775169bb5bf63ea016df5e.tar.bz2
fix FeatureSummary for REQUIRED packages, they were reported as OPTIONAL
Alex
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 7d3f09b..22bb628 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();