Merge topic 'mfc-utility-targets'

a15e375c Fix MFC setting on utility targets (#15867)
This commit is contained in:
Brad King 2016-01-20 08:33:38 -05:00 committed by CMake Topic Stage
commit ae5f30b36a
1 changed files with 9 additions and 6 deletions

View File

@ -762,13 +762,16 @@ void cmVisualStudio10TargetGenerator
std::string mfcFlagValue = mfcFlag ? mfcFlag : "0";
std::string useOfMfcValue = "false";
if(mfcFlagValue == "1")
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
{
useOfMfcValue = "Static";
}
else if(mfcFlagValue == "2")
{
useOfMfcValue = "Dynamic";
if(mfcFlagValue == "1")
{
useOfMfcValue = "Static";
}
else if(mfcFlagValue == "2")
{
useOfMfcValue = "Dynamic";
}
}
std::string mfcLine = "<UseOfMfc>";
mfcLine += useOfMfcValue + "</UseOfMfc>\n";