diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-11 17:11:20 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-11 17:11:20 (GMT) |
commit | fc933df1fc303f305735d28e9e8a0fb43b41ca1a (patch) | |
tree | 433b0dd5aeafe5ce8d261d9da8f1650281df38e7 /Source/cmMSDotNETGenerator.cxx | |
parent | 938e6e487b838fc844249b49f1b5860a91683649 (diff) | |
download | CMake-fc933df1fc303f305735d28e9e8a0fb43b41ca1a.zip CMake-fc933df1fc303f305735d28e9e8a0fb43b41ca1a.tar.gz CMake-fc933df1fc303f305735d28e9e8a0fb43b41ca1a.tar.bz2 |
ENH: add support for .def files
Diffstat (limited to 'Source/cmMSDotNETGenerator.cxx')
-rw-r--r-- | Source/cmMSDotNETGenerator.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx index 998c3a6..f47b822 100644 --- a/Source/cmMSDotNETGenerator.cxx +++ b/Source/cmMSDotNETGenerator.cxx @@ -837,6 +837,7 @@ void cmMSDotNETGenerator::OutputBuildTool(std::ostream& fout, fout << "\t\t\t\tAdditionalLibraryDirectories=\""; this->OutputLibraryDirectories(fout, configName, libName, target); fout << "\"\n"; + this->OutputModuleDefinitionFile(fout, target); fout << "\t\t\t\tProgramDatabaseFile=\"" << m_LibraryOutputPath << "$(OutDir)\\" << libName << ".pdb\"\n"; if(strcmp(configName, "Debug") == 0) @@ -887,6 +888,24 @@ void cmMSDotNETGenerator::OutputBuildTool(std::ostream& fout, } } +void cmMSDotNETGenerator::OutputModuleDefinitionFile(std::ostream& fout, + const cmTarget &target) +{ + std::vector<cmSourceFile> const& classes = target.GetSourceFiles(); + for(std::vector<cmSourceFile>::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + if(cmSystemTools::UpperCase(i->GetSourceExtension()) == "DEF") + { + fout << "\t\t\t\tModuleDefinitionFile=\"" + << this->ConvertToXMLOutputPath(i->GetFullPath().c_str()) + << "\"\n"; + return; + } + } + +} + void cmMSDotNETGenerator::OutputLibraryDirectories(std::ostream& fout, const char* configName, const char* libName, @@ -992,12 +1011,17 @@ void cmMSDotNETGenerator::WriteVCProjFile(std::ostream& fout, std::vector<cmSourceGroup> sourceGroups = m_Makefile->GetSourceGroups(); // get the classes from the source lists then add them to the groups - std::vector<cmSourceFile> classes = target.GetSourceFiles(); - for(std::vector<cmSourceFile>::iterator i = classes.begin(); + std::vector<cmSourceFile> const& classes = target.GetSourceFiles(); + for(std::vector<cmSourceFile>::const_iterator i = classes.begin(); i != classes.end(); i++) { // Add the file to the list of sources. std::string source = i->GetFullPath(); + if(cmSystemTools::UpperCase(i->GetSourceExtension()) == "DEF") + { + m_ModuleDefinitionFile = i->GetFullPath(); + } + cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(), sourceGroups); sourceGroup.AddSource(source.c_str(), &(*i)); |