BUG: Fix imported target config guess

When an IMPORTED target provides no generic configuration and no match
for a desired configuration then we choose any available configuration.
This change corrects the choice when the first listed available
configuration does not really have a location.
This commit is contained in:
Brad King 2009-04-08 16:28:55 -04:00
parent d49978a948
commit 5886d10334

View File

@ -3565,7 +3565,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
!loc && aci != availableConfigs.end(); ++aci) !loc && aci != availableConfigs.end(); ++aci)
{ {
suffix = "_"; suffix = "_";
suffix += cmSystemTools::UpperCase(availableConfigs[0]); suffix += cmSystemTools::UpperCase(*aci);
std::string locProp = "IMPORTED_LOCATION"; std::string locProp = "IMPORTED_LOCATION";
locProp += suffix; locProp += suffix;
loc = this->GetProperty(locProp.c_str()); loc = this->GetProperty(locProp.c_str());