| 4419 | } |
| 4420 | |
| 4421 | void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( |
| 4422 | Elem& e1, std::string const& configName) |
| 4423 | { |
| 4424 | // Look through the sources for AndroidManifest.xml and use |
| 4425 | // its location as the root source directory. |
| 4426 | std::string rootDir = this->LocalGenerator->GetCurrentSourceDirectory(); |
| 4427 | { |
| 4428 | for (cmGeneratorTarget::AllConfigSource const& source : |
| 4429 | this->GeneratorTarget->GetAllConfigSources()) { |
| 4430 | if (source.Kind == cmGeneratorTarget::SourceKindExtra && |
| 4431 | "androidmanifest.xml" == |
| 4432 | cmSystemTools::LowerCase(source.Source->GetLocation().GetName())) { |
| 4433 | rootDir = source.Source->GetLocation().GetDirectory(); |
| 4434 | break; |
| 4435 | } |
| 4436 | } |
| 4437 | } |
| 4438 | |
| 4439 | // Tell MSBuild to launch Ant. |
| 4440 | Elem e2(e1, "AntBuild"); |
| 4441 | { |
| 4442 | std::string antBuildPath = rootDir; |
| 4443 | ConvertToWindowsSlash(antBuildPath); |
| 4444 | e2.Element("AntBuildPath", antBuildPath); |
| 4445 | } |
| 4446 | |
| 4447 | if (this->GeneratorTarget->GetPropertyAsBool("ANDROID_SKIP_ANT_STEP")) { |
| 4448 | e2.Element("SkipAntStep", "true"); |
| 4449 | } |
| 4450 | |
| 4451 | if (this->GeneratorTarget->GetPropertyAsBool("ANDROID_PROGUARD")) { |
| 4452 | e2.Element("EnableProGuard", "true"); |
| 4453 | } |
| 4454 | |
| 4455 | if (cmValue proGuardConfigLocation = |
| 4456 | this->GeneratorTarget->GetProperty("ANDROID_PROGUARD_CONFIG_PATH")) { |
| 4457 | e2.Element("ProGuardConfigLocation", *proGuardConfigLocation); |
| 4458 | } |
| 4459 | |
| 4460 | if (cmValue securePropertiesLocation = |
| 4461 | this->GeneratorTarget->GetProperty("ANDROID_SECURE_PROPS_PATH")) { |
| 4462 | e2.Element("SecurePropertiesLocation", *securePropertiesLocation); |
| 4463 | } |
| 4464 | |
| 4465 | if (cmValue nativeLibDirectoriesExpression = |
| 4466 | this->GeneratorTarget->GetProperty("ANDROID_NATIVE_LIB_DIRECTORIES")) { |
| 4467 | std::string nativeLibDirs = cmGeneratorExpression::Evaluate( |
| 4468 | *nativeLibDirectoriesExpression, this->LocalGenerator, configName); |
| 4469 | e2.Element("NativeLibDirectories", nativeLibDirs); |
| 4470 | } |
| 4471 | |
| 4472 | if (cmValue nativeLibDependenciesExpression = |
| 4473 | this->GeneratorTarget->GetProperty( |
| 4474 | "ANDROID_NATIVE_LIB_DEPENDENCIES")) { |
| 4475 | std::string nativeLibDeps = cmGeneratorExpression::Evaluate( |
| 4476 | *nativeLibDependenciesExpression, this->LocalGenerator, configName); |
| 4477 | e2.Element("NativeLibDependencies", nativeLibDeps); |
| 4478 | } |
no test coverage detected