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

View File

@ -762,6 +762,8 @@ void cmVisualStudio10TargetGenerator
std::string mfcFlagValue = mfcFlag ? mfcFlag : "0"; std::string mfcFlagValue = mfcFlag ? mfcFlag : "0";
std::string useOfMfcValue = "false"; std::string useOfMfcValue = "false";
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
{
if(mfcFlagValue == "1") if(mfcFlagValue == "1")
{ {
useOfMfcValue = "Static"; useOfMfcValue = "Static";
@ -770,6 +772,7 @@ void cmVisualStudio10TargetGenerator
{ {
useOfMfcValue = "Dynamic"; useOfMfcValue = "Dynamic";
} }
}
std::string mfcLine = "<UseOfMfc>"; std::string mfcLine = "<UseOfMfc>";
mfcLine += useOfMfcValue + "</UseOfMfc>\n"; mfcLine += useOfMfcValue + "</UseOfMfc>\n";
this->WriteString(mfcLine.c_str(), 2); this->WriteString(mfcLine.c_str(), 2);