Fix for bug 10001, make vs 10 compiler .rc files correctly
This commit is contained in:
parent
9478ad0945
commit
39f851dc7c
@ -396,6 +396,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
|||||||
std::vector<cmSourceFile*> customBuild;
|
std::vector<cmSourceFile*> customBuild;
|
||||||
std::vector<cmSourceFile*> none;
|
std::vector<cmSourceFile*> none;
|
||||||
std::vector<cmSourceFile*> headers;
|
std::vector<cmSourceFile*> headers;
|
||||||
|
std::vector<cmSourceFile*> resource;
|
||||||
|
|
||||||
for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
|
for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
|
||||||
s != classes.end(); s++)
|
s != classes.end(); s++)
|
||||||
@ -417,6 +418,10 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
|||||||
{
|
{
|
||||||
clCompile.push_back(sf);
|
clCompile.push_back(sf);
|
||||||
}
|
}
|
||||||
|
if(strcmp(lang, "RC") == 0)
|
||||||
|
{
|
||||||
|
resource.push_back(sf);
|
||||||
|
}
|
||||||
else if(sf->GetCustomCommand())
|
else if(sf->GetCustomCommand())
|
||||||
{
|
{
|
||||||
customBuild.push_back(sf);
|
customBuild.push_back(sf);
|
||||||
@ -448,6 +453,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
|||||||
0);
|
0);
|
||||||
this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
|
this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
|
||||||
this->WriteGroupSources("ClInclude", headers, sourceGroups);
|
this->WriteGroupSources("ClInclude", headers, sourceGroups);
|
||||||
|
this->WriteGroupSources("ResourceCompile", resource, sourceGroups);
|
||||||
this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
|
this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
|
||||||
|
|
||||||
this->WriteString("<ItemGroup>\n", 1);
|
this->WriteString("<ItemGroup>\n", 1);
|
||||||
@ -568,7 +574,7 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
|
|||||||
((*source)->GetExtension().c_str());
|
((*source)->GetExtension().c_str());
|
||||||
const char* lang = (*source)->GetLanguage();
|
const char* lang = (*source)->GetLanguage();
|
||||||
bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
|
bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
|
||||||
{
|
bool rc = lang && (strcmp(lang, "RC") == 0);
|
||||||
std::string sourceFile = (*source)->GetFullPath();
|
std::string sourceFile = (*source)->GetFullPath();
|
||||||
sourceFile = cmSystemTools::RelativePath(
|
sourceFile = cmSystemTools::RelativePath(
|
||||||
this->Makefile->GetCurrentOutputDirectory(),
|
this->Makefile->GetCurrentOutputDirectory(),
|
||||||
@ -583,6 +589,10 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
|
|||||||
{
|
{
|
||||||
this->WriteString("<ClCompile Include=\"", 2);
|
this->WriteString("<ClCompile Include=\"", 2);
|
||||||
}
|
}
|
||||||
|
else if(rc)
|
||||||
|
{
|
||||||
|
this->WriteString("<ResourceCompile Include=\"", 2);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->WriteString("<None Include=\"", 2);
|
this->WriteString("<None Include=\"", 2);
|
||||||
@ -601,7 +611,6 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this->WriteString("</ItemGroup>\n", 1);
|
this->WriteString("</ItemGroup>\n", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user