summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-11-15 19:38:56 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-11-15 19:38:56 (GMT)
commitf1197ff0dac1ab02b7515d79a2c46075538360c5 (patch)
tree00d94393f67209ce8d5b58500d9b16aa4db194bf /Source/cmVisualStudio10TargetGenerator.cxx
parent608d05b469a446aeb85c0d3374ccf2a3f397292b (diff)
parent537020f9581d36c436d18e30f98d58f0ef5924cc (diff)
downloadCMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.zip
CMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.tar.gz
CMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.tar.bz2
Merge topic 'fix-11213-vs10-mfc-support'
537020f Tests: Nudge MFC test to pass on VS 6 dashboards (#11213) 51f442e VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213) d85ab7a Tests: Add environment logging to the MFC test (#11213) 011694c VS10: Use expected values for UseOfMfc (#11213) a2e6d24 Tests: Fix MFC test to work with VS 10 and later (#11213)
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 45a79c8..d748c40 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -298,16 +298,24 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
}
configType += "</ConfigurationType>\n";
this->WriteString(configType.c_str(), 2);
+
const char* mfcFlag =
this->Target->GetMakefile()->GetDefinition("CMAKE_MFC_FLAG");
- if(mfcFlag)
+ std::string mfcFlagValue = mfcFlag ? mfcFlag : "0";
+
+ std::string useOfMfcValue = "false";
+ if(mfcFlagValue == "1")
{
- this->WriteString("<UseOfMfc>true</UseOfMfc>\n", 2);
+ useOfMfcValue = "Static";
}
- else
+ else if(mfcFlagValue == "2")
{
- this->WriteString("<UseOfMfc>false</UseOfMfc>\n", 2);
+ useOfMfcValue = "Dynamic";
}
+ std::string mfcLine = "<UseOfMfc>";
+ mfcLine += useOfMfcValue + "</UseOfMfc>\n";
+ this->WriteString(mfcLine.c_str(), 2);
+
if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY &&
this->ClOptions[*i]->UsingUnicode())
{