| 4379 | } |
| 4380 | |
| 4381 | void cmVisualStudio10TargetGenerator::WriteManifestOptions( |
| 4382 | Elem& e1, std::string const& config) |
| 4383 | { |
| 4384 | if (this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE && |
| 4385 | this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY && |
| 4386 | this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY) { |
| 4387 | return; |
| 4388 | } |
| 4389 | |
| 4390 | std::vector<cmSourceFile const*> manifest_srcs; |
| 4391 | this->GeneratorTarget->GetManifests(manifest_srcs, config); |
| 4392 | |
| 4393 | cmValue dpiAware = this->GeneratorTarget->GetProperty("VS_DPI_AWARE"); |
| 4394 | |
| 4395 | if (!manifest_srcs.empty() || dpiAware) { |
| 4396 | Elem e2(e1, "Manifest"); |
| 4397 | if (!manifest_srcs.empty()) { |
| 4398 | std::ostringstream oss; |
| 4399 | for (cmSourceFile const* mi : manifest_srcs) { |
| 4400 | std::string m = this->ConvertPath(mi->GetFullPath(), false); |
| 4401 | ConvertToWindowsSlash(m); |
| 4402 | oss << m << ";"; |
| 4403 | } |
| 4404 | e2.Element("AdditionalManifestFiles", oss.str()); |
| 4405 | } |
| 4406 | if (dpiAware) { |
| 4407 | if (*dpiAware == "PerMonitor"_s) { |
| 4408 | e2.Element("EnableDpiAwareness", "PerMonitorHighDPIAware"); |
| 4409 | } else if (dpiAware.IsOn()) { |
| 4410 | e2.Element("EnableDpiAwareness", "true"); |
| 4411 | } else if (dpiAware.IsOff()) { |
| 4412 | e2.Element("EnableDpiAwareness", "false"); |
| 4413 | } else { |
| 4414 | cmSystemTools::Error( |
| 4415 | cmStrCat("Bad parameter for VS_DPI_AWARE: ", *dpiAware)); |
| 4416 | } |
| 4417 | } |
| 4418 | } |
| 4419 | } |
| 4420 | |
| 4421 | void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( |
| 4422 | Elem& e1, std::string const& configName) |
no test coverage detected