|  | @@ -300,7 +300,7 @@ void cmVisualStudio10TargetGenerator::Generate()
 | 
	
		
			
				|  |  |    this->WriteCustomCommands();
 | 
	
		
			
				|  |  |    this->WriteAllSources();
 | 
	
		
			
				|  |  |    this->WriteDotNetReferences();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +  this->WriteEmbeddedResourceGroup();
 | 
	
		
			
				|  |  |    this->WriteWinRTReferences();
 | 
	
		
			
				|  |  |    this->WriteProjectReferences();
 | 
	
		
			
				|  |  |    this->WriteString(
 | 
	
	
		
			
				|  | @@ -339,6 +339,47 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences()
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +  std::vector<cmSourceFile*> const& resxObjs =
 | 
	
		
			
				|  |  | +    this->GeneratorTarget->ResxSources;
 | 
	
		
			
				|  |  | +  if(!resxObjs.empty())
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +    this->WriteString("<ItemGroup>\n", 1);
 | 
	
		
			
				|  |  | +    for(std::vector<cmSourceFile*>::const_iterator oi = resxObjs.begin();
 | 
	
		
			
				|  |  | +        oi != resxObjs.end(); ++oi)
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +      std::string obj = (*oi)->GetFullPath();
 | 
	
		
			
				|  |  | +      this->WriteString("<EmbeddedResource Include=\"", 2);
 | 
	
		
			
				|  |  | +      this->ConvertToWindowsSlash(obj);
 | 
	
		
			
				|  |  | +      (*this->BuildFileStream ) << obj << "\">\n";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this->WriteString("<DependentUpon>", 3);
 | 
	
		
			
				|  |  | +      std::string hFileName = obj.substr(0, obj.find_last_of(".")) + ".h";
 | 
	
		
			
				|  |  | +      (*this->BuildFileStream ) << hFileName;
 | 
	
		
			
				|  |  | +      this->WriteString("</DependentUpon>\n", 3);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      std::vector<std::string> const * configs =
 | 
	
		
			
				|  |  | +        this->GlobalGenerator->GetConfigurations();
 | 
	
		
			
				|  |  | +      for(std::vector<std::string>::const_iterator i = configs->begin();
 | 
	
		
			
				|  |  | +          i != configs->end(); ++i)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +        this->WritePlatformConfigTag("LogicalName", i->c_str(), 3);
 | 
	
		
			
				|  |  | +        if(this->Target->GetProperty("VS_GLOBAL_ROOTNAMESPACE"))
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +          (*this->BuildFileStream ) << "$(RootNamespace).";
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        (*this->BuildFileStream ) << "%(Filename)";
 | 
	
		
			
				|  |  | +        (*this->BuildFileStream ) << ".resources";
 | 
	
		
			
				|  |  | +        (*this->BuildFileStream ) << "</LogicalName>\n";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this->WriteString("</EmbeddedResource>\n", 2);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    this->WriteString("</ItemGroup>\n", 1);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  void cmVisualStudio10TargetGenerator::WriteWinRTReferences()
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |    std::vector<std::string> references;
 | 
	
	
		
			
				|  | @@ -466,11 +507,6 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
 | 
	
		
			
				|  |  |                          "</WindowsAppContainer>\n", 2);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if(!this->GeneratorTarget->ResxSources.empty())
 | 
	
		
			
				|  |  | -      {
 | 
	
		
			
				|  |  | -      this->WriteString("<CLRSupport>true</CLRSupport>\n", 2);
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      this->WriteString("</PropertyGroup>\n", 1);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -663,11 +699,12 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
 | 
	
		
			
				|  |  |      this->WriteGroupSources(ti->first.c_str(), ti->second, sourceGroups);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  std::vector<cmSourceFile*> resxObjs = this->GeneratorTarget->ResxSources;
 | 
	
		
			
				|  |  | +  std::vector<cmSourceFile*> const& resxObjs =
 | 
	
		
			
				|  |  | +    this->GeneratorTarget->ResxSources;
 | 
	
		
			
				|  |  |    if(!resxObjs.empty())
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |      this->WriteString("<ItemGroup>\n", 1);
 | 
	
		
			
				|  |  | -    for(std::vector<cmSourceFile*>::iterator oi = resxObjs.begin();
 | 
	
		
			
				|  |  | +    for(std::vector<cmSourceFile*>::const_iterator oi = resxObjs.begin();
 | 
	
		
			
				|  |  |          oi != resxObjs.end(); ++oi)
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  |        std::string obj = (*oi)->GetFullPath();
 |