summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-01-28 21:48:20 (GMT)
committerBrad King <brad.king@kitware.com>2010-01-28 21:48:20 (GMT)
commitdc1d2189ae922be9d6e7f5fde698532db47e46aa (patch)
tree28ef61aac78f0bdc190a760d53b6cb89b24262cd /Source/cmVisualStudio10TargetGenerator.cxx
parent612409e5b01a7e4823bb379ee9e002177793eb75 (diff)
downloadCMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.zip
CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.gz
CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.bz2
CMake 2.8.1-rc1
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx70
1 files changed, 40 insertions, 30 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 32fcead..4a8e161 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -396,6 +396,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
std::vector<cmSourceFile*> customBuild;
std::vector<cmSourceFile*> none;
std::vector<cmSourceFile*> headers;
+ std::vector<cmSourceFile*> resource;
for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
s != classes.end(); s++)
@@ -417,6 +418,10 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
{
clCompile.push_back(sf);
}
+ if(strcmp(lang, "RC") == 0)
+ {
+ resource.push_back(sf);
+ }
else if(sf->GetCustomCommand())
{
customBuild.push_back(sf);
@@ -448,6 +453,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
0);
this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
this->WriteGroupSources("ClInclude", headers, sourceGroups);
+ this->WriteGroupSources("ResourceCompile", resource, sourceGroups);
this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
this->WriteString("<ItemGroup>\n", 1);
@@ -568,37 +574,40 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
((*source)->GetExtension().c_str());
const char* lang = (*source)->GetLanguage();
bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
+ bool rc = lang && (strcmp(lang, "RC") == 0);
+ std::string sourceFile = (*source)->GetFullPath();
+ sourceFile = cmSystemTools::RelativePath(
+ this->Makefile->GetCurrentOutputDirectory(),
+ sourceFile.c_str());
+ this->ConvertToWindowsSlash(sourceFile);
+ // output the source file
+ if(header)
+ {
+ this->WriteString("<ClInclude Include=\"", 2);
+ }
+ else if(cl)
+ {
+ this->WriteString("<ClCompile Include=\"", 2);
+ }
+ else if(rc)
+ {
+ this->WriteString("<ResourceCompile Include=\"", 2);
+ }
+ else
+ {
+ this->WriteString("<None Include=\"", 2);
+ }
+ (*this->BuildFileStream ) << sourceFile << "\"";
+ // ouput any flags specific to this source file
+ if(cl && this->OutputSourceSpecificFlags(*source))
+ {
+ // if the source file has specific flags the tag
+ // is ended on a new line
+ this->WriteString("</ClCompile>\n", 2);
+ }
+ else
{
- std::string sourceFile = (*source)->GetFullPath();
- sourceFile = cmSystemTools::RelativePath(
- this->Makefile->GetCurrentOutputDirectory(),
- sourceFile.c_str());
- this->ConvertToWindowsSlash(sourceFile);
- // output the source file
- if(header)
- {
- this->WriteString("<ClInclude Include=\"", 2);
- }
- else if(cl)
- {
- this->WriteString("<ClCompile Include=\"", 2);
- }
- else
- {
- this->WriteString("<None Include=\"", 2);
- }
- (*this->BuildFileStream ) << sourceFile << "\"";
- // ouput any flags specific to this source file
- if(cl && this->OutputSourceSpecificFlags(*source))
- {
- // if the source file has specific flags the tag
- // is ended on a new line
- this->WriteString("</ClCompile>\n", 2);
- }
- else
- {
- (*this->BuildFileStream ) << " />\n";
- }
+ (*this->BuildFileStream ) << " />\n";
}
}
}
@@ -1222,6 +1231,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
Convert(l->Value.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::UNCHANGED);
+ this->ConvertToWindowsSlash(path);
libstring += sep;
libstring += path;
}