From 5886d103348ba7c14e464c851d3316f09cc2c0c6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 8 Apr 2009 16:28:55 -0400 Subject: [PATCH] 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. --- Source/cmTarget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a640b0d61..09f261d75 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3565,7 +3565,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config, !loc && aci != availableConfigs.end(); ++aci) { suffix = "_"; - suffix += cmSystemTools::UpperCase(availableConfigs[0]); + suffix += cmSystemTools::UpperCase(*aci); std::string locProp = "IMPORTED_LOCATION"; locProp += suffix; loc = this->GetProperty(locProp.c_str());