VS: Generate WindowsPhone and WindowsStore application types
Generate the ApplicationType and ApplicationTypeRevision elements in .vcxproj files.
This commit is contained in:
parent
72395ab23e
commit
709cebde66
|
@ -286,6 +286,11 @@ void cmVisualStudio10TargetGenerator::Generate()
|
||||||
this->WriteString("<ProjectGUID>", 2);
|
this->WriteString("<ProjectGUID>", 2);
|
||||||
(*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
|
(*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
|
||||||
|
|
||||||
|
if(this->MSTools && this->Target->GetType() <= cmTarget::UTILITY)
|
||||||
|
{
|
||||||
|
this->WriteApplicationTypeSettings();
|
||||||
|
}
|
||||||
|
|
||||||
const char* vsProjectTypes =
|
const char* vsProjectTypes =
|
||||||
this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES");
|
this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES");
|
||||||
if(vsProjectTypes)
|
if(vsProjectTypes)
|
||||||
|
@ -2100,3 +2105,20 @@ bool cmVisualStudio10TargetGenerator::
|
||||||
expectedResxHeaders.find(headerFile);
|
expectedResxHeaders.find(headerFile);
|
||||||
return it != expectedResxHeaders.end();
|
return it != expectedResxHeaders.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
|
||||||
|
{
|
||||||
|
bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone();
|
||||||
|
bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore();
|
||||||
|
std::string const& v = this->GlobalGenerator->GetSystemVersion();
|
||||||
|
if(isWindowsPhone || isWindowsStore)
|
||||||
|
{
|
||||||
|
this->WriteString("<ApplicationType>", 2);
|
||||||
|
(*this->BuildFileStream) << (isWindowsPhone ?
|
||||||
|
"Windows Phone" : "Windows Store")
|
||||||
|
<< "</ApplicationType>\n";
|
||||||
|
this->WriteString("<ApplicationTypeRevision>", 2);
|
||||||
|
(*this->BuildFileStream) << cmVS10EscapeXML(v)
|
||||||
|
<< "</ApplicationTypeRevision>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ private:
|
||||||
void WriteCustomCommand(cmSourceFile const* sf);
|
void WriteCustomCommand(cmSourceFile const* sf);
|
||||||
void WriteGroups();
|
void WriteGroups();
|
||||||
void WriteProjectReferences();
|
void WriteProjectReferences();
|
||||||
|
void WriteApplicationTypeSettings();
|
||||||
bool OutputSourceSpecificFlags(cmSourceFile const* source);
|
bool OutputSourceSpecificFlags(cmSourceFile const* source);
|
||||||
void AddLibraries(cmComputeLinkInformation& cli,
|
void AddLibraries(cmComputeLinkInformation& cli,
|
||||||
std::vector<std::string>& libVec);
|
std::vector<std::string>& libVec);
|
||||||
|
|
Loading…
Reference in New Issue