summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGilles Khouzam <gillesk@microsoft.com>2014-07-31 17:22:35 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-31 18:09:03 (GMT)
commit709cebde66a4251e1a1ed7a90c072f06be691bee (patch)
tree1a1c5ccd9b0880ba1614e5452a721faf7f63ca51 /Source
parent72395ab23eee5ed7ff5a8800632869d6ef66f805 (diff)
downloadCMake-709cebde66a4251e1a1ed7a90c072f06be691bee.zip
CMake-709cebde66a4251e1a1ed7a90c072f06be691bee.tar.gz
CMake-709cebde66a4251e1a1ed7a90c072f06be691bee.tar.bz2
VS: Generate WindowsPhone and WindowsStore application types
Generate the ApplicationType and ApplicationTypeRevision elements in .vcxproj files.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx22
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 18d8951..e9421e3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -286,6 +286,11 @@ void cmVisualStudio10TargetGenerator::Generate()
this->WriteString("<ProjectGUID>", 2);
(*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
+ if(this->MSTools && this->Target->GetType() <= cmTarget::UTILITY)
+ {
+ this->WriteApplicationTypeSettings();
+ }
+
const char* vsProjectTypes =
this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES");
if(vsProjectTypes)
@@ -2100,3 +2105,20 @@ bool cmVisualStudio10TargetGenerator::
expectedResxHeaders.find(headerFile);
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";
+ }
+}
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 7436372..2bbdb8c 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -91,6 +91,7 @@ private:
void WriteCustomCommand(cmSourceFile const* sf);
void WriteGroups();
void WriteProjectReferences();
+ void WriteApplicationTypeSettings();
bool OutputSourceSpecificFlags(cmSourceFile const* source);
void AddLibraries(cmComputeLinkInformation& cli,
std::vector<std::string>& libVec);