diff options
author | Brad King <brad.king@kitware.com> | 2011-01-11 20:51:08 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-01-11 20:51:08 (GMT) |
commit | af94289f5a0f839113cb53068396a33720109acb (patch) | |
tree | d58a27dfb7d09848b4c4dc591bbca2cbd4a345c3 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | c73babf5d2f8bb93bef9adc947a59cc4b8189853 (diff) | |
parent | e33cbda5c459e10bcbfc1f407951f9deaffe8fdf (diff) | |
download | CMake-af94289f5a0f839113cb53068396a33720109acb.zip CMake-af94289f5a0f839113cb53068396a33720109acb.tar.gz CMake-af94289f5a0f839113cb53068396a33720109acb.tar.bz2 |
Merge topic 'fix-11461-add-midl-vs10'
e33cbda VSMidl Test: Use correct include_directories with VS6 (#11461)
262da91 Prohibit space in HOME value for VSMidl test.
13caaa3 VS10: Finish Midl support (#11461)
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index ed017c7..8402b50 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -436,6 +436,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups() std::vector<cmSourceFile*> customBuild; std::vector<cmSourceFile*> none; std::vector<cmSourceFile*> headers; + std::vector<cmSourceFile*> idls; std::vector<cmSourceFile*> resource; for(std::vector<cmSourceFile*>::const_iterator s = classes.begin(); @@ -458,7 +459,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups() { clCompile.push_back(sf); } - if(strcmp(lang, "RC") == 0) + else if(strcmp(lang, "RC") == 0) { resource.push_back(sf); } @@ -470,6 +471,10 @@ void cmVisualStudio10TargetGenerator::WriteGroups() { headers.push_back(sf); } + else if(sf->GetExtension() == "idl") + { + idls.push_back(sf); + } else { none.push_back(sf); @@ -498,6 +503,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups() this->WriteGroupSources("ClCompile", clCompile, sourceGroups); this->WriteGroupSources("ClInclude", headers, sourceGroups); this->WriteGroupSources("ResourceCompile", resource, sourceGroups); + this->WriteGroupSources("Midl", idls, sourceGroups); this->WriteGroupSources("CustomBuild", customBuild, sourceGroups); this->WriteString("<ItemGroup>\n", 1); @@ -670,6 +676,7 @@ void cmVisualStudio10TargetGenerator::WriteCLSources() const char* lang = (*source)->GetLanguage(); bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0); bool rc = lang && (strcmp(lang, "RC") == 0); + bool idl = (*source)->GetExtension() == "idl"; std::string sourceFile = (*source)->GetFullPath(); sourceFile = cmSystemTools::RelativePath( this->Makefile->GetCurrentOutputDirectory(), @@ -688,6 +695,10 @@ void cmVisualStudio10TargetGenerator::WriteCLSources() { this->WriteString("<ResourceCompile Include=\"", 2); } + else if(idl) + { + this->WriteString("<Midl Include=\"", 2); + } else { this->WriteString("<None Include=\"", 2); @@ -1397,11 +1408,20 @@ WriteMidlOptions(std::string const& /*config*/, { this->WriteString("<Midl>\n", 2); this->OutputIncludes(includes); + this->WriteString("<OutputDirectory>$(IntDir)</OutputDirectory>\n", 3); + this->WriteString("<HeaderFileName>%(Filename).h</HeaderFileName>\n", 3); + this->WriteString( + "<TypeLibraryName>%(Filename).tlb</TypeLibraryName>\n", 3); + this->WriteString( + "<InterfaceIdentifierFileName>" + "%(Filename)_i.c</InterfaceIdentifierFileName>\n", 3); + this->WriteString("<ProxyFileName>%(Filename)_p.c</ProxyFileName>\n",3); this->WriteString("</Midl>\n", 2); } - + + void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() -{ +{ std::vector<std::string> *configs = static_cast<cmGlobalVisualStudio7Generator *> (this->GlobalGenerator)->GetConfigurations(); |