ENH: fix adding of rc files
This commit is contained in:
parent
56c0b62095
commit
c2ad3e4afc
|
@ -37,6 +37,9 @@ void cmLocalVisualStudio7Generator::Generate()
|
|||
std::set<cmStdString> lang;
|
||||
lang.insert("C");
|
||||
lang.insert("CXX");
|
||||
lang.insert("RC");
|
||||
lang.insert("IDL");
|
||||
lang.insert("DEF");
|
||||
this->CreateCustomTargetsAndCommands(lang);
|
||||
this->OutputVCProjFile();
|
||||
}
|
||||
|
@ -343,6 +346,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
|||
target.GetName());
|
||||
return;
|
||||
}
|
||||
if(!(strcmp(linkLanguage, "RC") == 0 || strcmp(linkLanguage, "DEF") == 0))
|
||||
{
|
||||
std::string baseFlagVar = "CMAKE_";
|
||||
baseFlagVar += linkLanguage;
|
||||
baseFlagVar += "_FLAGS";
|
||||
|
@ -360,6 +365,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
|||
flagVar = baseFlagVar + "_RELWITHDEBINFO";
|
||||
flagsDebugRel += m_Makefile->GetRequiredDefinition(flagVar.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
std::string programDatabase;
|
||||
const char* pre = "WIN32,_DEBUG,_WINDOWS";
|
||||
|
@ -1037,10 +1043,20 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
|
|||
else if(compileFlags.size() || additionalDeps.length())
|
||||
{
|
||||
const char* aCompilerTool = "VCCLCompilerTool";
|
||||
if((*sf)->GetSourceExtension() == "idl")
|
||||
std::string ext = (*sf)->GetSourceExtension();
|
||||
ext = cmSystemTools::LowerCase(ext);
|
||||
if(ext == "idl")
|
||||
{
|
||||
aCompilerTool = "VCMIDLTool";
|
||||
}
|
||||
if(ext == "rc")
|
||||
{
|
||||
aCompilerTool = "VCResourceCompilerTool";
|
||||
}
|
||||
if(ext == "def")
|
||||
{
|
||||
aCompilerTool = "VCCustomBuildTool";
|
||||
}
|
||||
for(std::vector<std::string>::iterator i = configs->begin();
|
||||
i != configs->end(); ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue