VS: Re-arrange WriteExtraSource to support tool configuration
Add a code path to write the tool open and close elements separately so that we can add content in between to configure it.
This commit is contained in:
parent
2b20110f68
commit
f063a914c6
|
@ -1018,6 +1018,7 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf)
|
||||||
|
|
||||||
void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||||
{
|
{
|
||||||
|
bool toolHasSettings = false;
|
||||||
std::string tool = "None";
|
std::string tool = "None";
|
||||||
std::string const& ext = sf->GetExtension();
|
std::string const& ext = sf->GetExtension();
|
||||||
if(ext == "appxmanifest")
|
if(ext == "appxmanifest")
|
||||||
|
@ -1033,7 +1034,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||||
{
|
{
|
||||||
tool = "XML";
|
tool = "XML";
|
||||||
}
|
}
|
||||||
this->WriteSource(tool, sf);
|
|
||||||
|
if(toolHasSettings)
|
||||||
|
{
|
||||||
|
this->WriteSource(tool, sf, ">\n");
|
||||||
|
|
||||||
|
this->WriteString("</", 2);
|
||||||
|
(*this->BuildFileStream) << tool << ">\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->WriteSource(tool, sf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmVisualStudio10TargetGenerator::WriteSource(
|
void cmVisualStudio10TargetGenerator::WriteSource(
|
||||||
|
|
Loading…
Reference in New Issue