diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9e706a584c..e1b8475fcf 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -439,18 +439,20 @@ void cmVisualStudio10TargetGenerator::Generate() if (!this->ComputeLibOptions()) { return; } - for (std::string const& config : this->Configurations) { - // Default character set if not populated above. - this->CharSet.emplace( - config, - (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") || - this->GlobalGenerator->TargetsWindowsPhone() || - this->GlobalGenerator->TargetsWindowsStore() || - this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_EXTENSIONS")) - ? MsvcCharSet::Unicode - : MsvcCharSet::MultiByte); - } } + + for (std::string const& config : this->Configurations) { + // Default character set if not populated above. + this->CharSet.emplace( + config, + (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") || + this->GlobalGenerator->TargetsWindowsPhone() || + this->GlobalGenerator->TargetsWindowsStore() || + this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_EXTENSIONS")) + ? MsvcCharSet::Unicode + : MsvcCharSet::MultiByte); + } + std::string path = cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(), '/', this->Name, ProjectFileExtension); @@ -1552,12 +1554,9 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( e1.Element("UseOfMfc", useOfMfcValue); } - if ((this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY && - this->CharSet[config] == MsvcCharSet::Unicode)) { + if (this->CharSet[config] == MsvcCharSet::Unicode) { e1.Element("CharacterSet", "Unicode"); - } else if (this->GeneratorTarget->GetType() <= - cmStateEnums::OBJECT_LIBRARY && - this->CharSet[config] == MsvcCharSet::SingleByte) { + } else if (this->CharSet[config] == MsvcCharSet::SingleByte) { e1.Element("CharacterSet", "NotSet"); } else { e1.Element("CharacterSet", "MultiByte");