ENH: add support for .def files
This commit is contained in:
parent
938e6e487b
commit
fc933df1fc
|
@ -837,6 +837,7 @@ void cmMSDotNETGenerator::OutputBuildTool(std::ostream& fout,
|
||||||
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
||||||
this->OutputLibraryDirectories(fout, configName, libName, target);
|
this->OutputLibraryDirectories(fout, configName, libName, target);
|
||||||
fout << "\"\n";
|
fout << "\"\n";
|
||||||
|
this->OutputModuleDefinitionFile(fout, target);
|
||||||
fout << "\t\t\t\tProgramDatabaseFile=\"" << m_LibraryOutputPath
|
fout << "\t\t\t\tProgramDatabaseFile=\"" << m_LibraryOutputPath
|
||||||
<< "$(OutDir)\\" << libName << ".pdb\"\n";
|
<< "$(OutDir)\\" << libName << ".pdb\"\n";
|
||||||
if(strcmp(configName, "Debug") == 0)
|
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,
|
void cmMSDotNETGenerator::OutputLibraryDirectories(std::ostream& fout,
|
||||||
const char* configName,
|
const char* configName,
|
||||||
const char* libName,
|
const char* libName,
|
||||||
|
@ -992,12 +1011,17 @@ void cmMSDotNETGenerator::WriteVCProjFile(std::ostream& fout,
|
||||||
std::vector<cmSourceGroup> sourceGroups = m_Makefile->GetSourceGroups();
|
std::vector<cmSourceGroup> sourceGroups = m_Makefile->GetSourceGroups();
|
||||||
|
|
||||||
// get the classes from the source lists then add them to the groups
|
// get the classes from the source lists then add them to the groups
|
||||||
std::vector<cmSourceFile> classes = target.GetSourceFiles();
|
std::vector<cmSourceFile> const& classes = target.GetSourceFiles();
|
||||||
for(std::vector<cmSourceFile>::iterator i = classes.begin();
|
for(std::vector<cmSourceFile>::const_iterator i = classes.begin();
|
||||||
i != classes.end(); i++)
|
i != classes.end(); i++)
|
||||||
{
|
{
|
||||||
// Add the file to the list of sources.
|
// Add the file to the list of sources.
|
||||||
std::string source = i->GetFullPath();
|
std::string source = i->GetFullPath();
|
||||||
|
if(cmSystemTools::UpperCase(i->GetSourceExtension()) == "DEF")
|
||||||
|
{
|
||||||
|
m_ModuleDefinitionFile = i->GetFullPath();
|
||||||
|
}
|
||||||
|
|
||||||
cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(),
|
cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(),
|
||||||
sourceGroups);
|
sourceGroups);
|
||||||
sourceGroup.AddSource(source.c_str(), &(*i));
|
sourceGroup.AddSource(source.c_str(), &(*i));
|
||||||
|
|
|
@ -143,6 +143,8 @@ private:
|
||||||
const char* configName,
|
const char* configName,
|
||||||
const char* libName,
|
const char* libName,
|
||||||
const cmTarget &target);
|
const cmTarget &target);
|
||||||
|
void OutputModuleDefinitionFile(std::ostream& fout,
|
||||||
|
const cmTarget &target);
|
||||||
void OutputLibraries(std::ostream& fout,
|
void OutputLibraries(std::ostream& fout,
|
||||||
const char* configName,
|
const char* configName,
|
||||||
const char* libName,
|
const char* libName,
|
||||||
|
@ -153,6 +155,7 @@ private:
|
||||||
bool m_BuildSLN;
|
bool m_BuildSLN;
|
||||||
std::string m_LibraryOutputPath;
|
std::string m_LibraryOutputPath;
|
||||||
std::string m_ExecutableOutputPath;
|
std::string m_ExecutableOutputPath;
|
||||||
|
std::string m_ModuleDefinitionFile;
|
||||||
std::vector<std::string> m_Configurations;
|
std::vector<std::string> m_Configurations;
|
||||||
std::string m_VCProjHeaderTemplate;
|
std::string m_VCProjHeaderTemplate;
|
||||||
std::string m_VCProjFooterTemplate;
|
std::string m_VCProjFooterTemplate;
|
||||||
|
|
Loading…
Reference in New Issue