| 5444 | } |
| 5445 | |
| 5446 | void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings(Elem& e1) |
| 5447 | { |
| 5448 | cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator; |
| 5449 | bool isAppContainer = false; |
| 5450 | bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone(); |
| 5451 | bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore(); |
| 5452 | bool const isAndroid = this->GlobalGenerator->TargetsAndroid(); |
| 5453 | std::string const& rev = this->GlobalGenerator->GetApplicationTypeRevision(); |
| 5454 | if (isWindowsPhone || isWindowsStore) { |
| 5455 | e1.Element("ApplicationType", |
| 5456 | (isWindowsPhone ? "Windows Phone" : "Windows Store")); |
| 5457 | e1.Element("DefaultLanguage", "en-US"); |
| 5458 | if (rev == "10.0"_s) { |
| 5459 | e1.Element("ApplicationTypeRevision", rev); |
| 5460 | // Visual Studio 14.0 is necessary for building 10.0 apps |
| 5461 | e1.Element("MinimumVisualStudioVersion", "14.0"); |
| 5462 | |
| 5463 | if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { |
| 5464 | isAppContainer = true; |
| 5465 | } |
| 5466 | } else if (rev == "8.1"_s) { |
| 5467 | e1.Element("ApplicationTypeRevision", rev); |
| 5468 | // Visual Studio 12.0 is necessary for building 8.1 apps |
| 5469 | e1.Element("MinimumVisualStudioVersion", "12.0"); |
| 5470 | |
| 5471 | if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { |
| 5472 | isAppContainer = true; |
| 5473 | } |
| 5474 | } else if (rev == "8.0"_s) { |
| 5475 | e1.Element("ApplicationTypeRevision", rev); |
| 5476 | // Visual Studio 11.0 is necessary for building 8.0 apps |
| 5477 | e1.Element("MinimumVisualStudioVersion", "11.0"); |
| 5478 | |
| 5479 | if (isWindowsStore && |
| 5480 | this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { |
| 5481 | isAppContainer = true; |
| 5482 | } else if (isWindowsPhone && |
| 5483 | this->GeneratorTarget->GetType() == |
| 5484 | cmStateEnums::EXECUTABLE) { |
| 5485 | e1.Element("XapOutputs", "true"); |
| 5486 | e1.Element("XapFilename", |
| 5487 | cmStrCat(this->Name, "_$(Configuration)_$(Platform).xap")); |
| 5488 | } |
| 5489 | } |
| 5490 | } else if (isAndroid) { |
| 5491 | e1.Element("ApplicationType", "Android"); |
| 5492 | e1.Element("ApplicationTypeRevision", |
| 5493 | gg->GetAndroidApplicationTypeRevision()); |
| 5494 | } |
| 5495 | if (isAppContainer) { |
| 5496 | e1.Element("AppContainerApplication", "true"); |
| 5497 | } else if (!isAndroid) { |
| 5498 | if (this->Platform == "ARM64"_s) { |
| 5499 | e1.Element("WindowsSDKDesktopARM64Support", "true"); |
| 5500 | } else if (this->Platform == "ARM"_s) { |
| 5501 | e1.Element("WindowsSDKDesktopARMSupport", "true"); |
| 5502 | } |
| 5503 | } |
no test coverage detected