diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 14 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 141 |
3 files changed, 150 insertions, 7 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e91166f..fa4f95d 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 3) -set(CMake_VERSION_PATCH 20150714) +set(CMake_VERSION_PATCH 20150715) #set(CMake_VERSION_RC 1) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2b73e6f..0303f1e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -297,6 +297,20 @@ void cmTarget::SetMakefile(cmMakefile* mf) { this->SetPropertyDefault("ANDROID_API", 0); this->SetPropertyDefault("ANDROID_API_MIN", 0); + this->SetPropertyDefault("ANDROID_ARCH", 0); + this->SetPropertyDefault("ANDROID_STL_TYPE", 0); + this->SetPropertyDefault("ANDROID_SKIP_ANT_STEP", 0); + this->SetPropertyDefault("ANDROID_PROCESS_MAX", 0); + this->SetPropertyDefault("ANDROID_PROGUARD", 0); + this->SetPropertyDefault("ANDROID_PROGUARD_CONFIG_PATH", 0); + this->SetPropertyDefault("ANDROID_SECURE_PROPS_PATH", 0); + this->SetPropertyDefault("ANDROID_NATIVE_LIB_DIRECTORIES", 0); + this->SetPropertyDefault("ANDROID_NATIVE_LIB_DEPENDENCIES", 0); + this->SetPropertyDefault("ANDROID_JAVA_SOURCE_DIR", 0); + this->SetPropertyDefault("ANDROID_JAR_DIRECTORIES", 0); + this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", 0); + this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", 0); + this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", 0); this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a2f9bca..67d52b8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -324,12 +324,22 @@ void cmVisualStudio10TargetGenerator::Generate() if(this->NsightTegra) { this->WriteString("<PropertyGroup Label=\"NsightTegraProject\">\n", 1); - if(this->NsightTegraVersion[0] >= 2) + const int nsightTegraMajorVersion = this->NsightTegraVersion[0]; + const int nsightTegraMinorVersion = this->NsightTegraVersion[1]; + if (nsightTegraMajorVersion >= 2) { - // Nsight Tegra 2.0 uses project revision 9. - this->WriteString("<NsightTegraProjectRevisionNumber>" - "9" - "</NsightTegraProjectRevisionNumber>\n", 2); + this->WriteString("<NsightTegraProjectRevisionNumber>", 2); + if (nsightTegraMajorVersion > 3 || + (nsightTegraMajorVersion == 3 && nsightTegraMinorVersion >= 1)) + { + (*this->BuildFileStream) << "11"; + } + else + { + // Nsight Tegra 2.0 uses project revision 9. + (*this->BuildFileStream) << "9"; + } + (*this->BuildFileStream) << "</NsightTegraProjectRevisionNumber>\n"; // Tell newer versions to upgrade silently when loading. this->WriteString("<NsightTegraUpgradeOnceWithoutPrompt>" "true" @@ -787,6 +797,20 @@ void cmVisualStudio10TargetGenerator (*this->BuildFileStream ) << "android-" << cmVS10EscapeXML(api) << "</AndroidTargetAPI>\n"; } + + if(const char* cpuArch = this->Target->GetProperty("ANDROID_ARCH")) + { + this->WriteString("<AndroidArch>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(cpuArch) << + "</AndroidArch>\n"; + } + + if(const char* stlType = this->Target->GetProperty("ANDROID_STL_TYPE")) + { + this->WriteString("<AndroidStlType>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(stlType) << + "</AndroidStlType>\n"; + } } void cmVisualStudio10TargetGenerator::WriteCustomCommands() @@ -1978,6 +2002,17 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", "\n", "CXX"); + if(this->NsightTegra) + { + if(const char* processMax = + this->Target->GetProperty("ANDROID_PROCESS_MAX")) + { + this->WriteString("<ProcessMax>", 3); + *this->BuildFileStream << cmVS10EscapeXML(processMax) << + "</ProcessMax>\n"; + } + } + if(this->MSTools) { this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3); @@ -2170,7 +2205,7 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) //---------------------------------------------------------------------------- void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( - std::string const&) + std::string const& configName) { // Look through the sources for AndroidManifest.xml and use // its location as the root source directory. @@ -2200,6 +2235,92 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( cmVS10EscapeXML(antBuildPath) << "</AntBuildPath>\n"; } + if (this->Target->GetPropertyAsBool("ANDROID_SKIP_ANT_STEP")) + { + this->WriteString("<SkipAntStep>true</SkipAntStep>\n", 3); + } + + if (this->Target->GetPropertyAsBool("ANDROID_PROGUARD")) + { + this->WriteString("<EnableProGuard>true</EnableProGuard>\n", 3); + } + + if (const char* proGuardConfigLocation = + this->Target->GetProperty("ANDROID_PROGUARD_CONFIG_PATH")) + { + this->WriteString("<ProGuardConfigLocation>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(proGuardConfigLocation) << + "</ProGuardConfigLocation>\n"; + } + + if (const char* securePropertiesLocation = + this->Target->GetProperty("ANDROID_SECURE_PROPS_PATH")) + { + this->WriteString("<SecurePropertiesLocation>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(securePropertiesLocation) << + "</SecurePropertiesLocation>\n"; + } + + if (const char* nativeLibDirectoriesExpression = + this->Target->GetProperty("ANDROID_NATIVE_LIB_DIRECTORIES")) + { + cmGeneratorExpression ge; + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(nativeLibDirectoriesExpression); + std::string nativeLibDirs = cge->Evaluate(this->Makefile, configName); + this->WriteString("<NativeLibDirectories>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDirs) << + "</NativeLibDirectories>\n"; + } + + if (const char* nativeLibDependenciesExpression = + this->Target->GetProperty("ANDROID_NATIVE_LIB_DEPENDENCIES")) + { + cmGeneratorExpression ge; + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(nativeLibDependenciesExpression); + std::string nativeLibDeps = cge->Evaluate(this->Makefile, configName); + this->WriteString("<NativeLibDependencies>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDeps) << + "</NativeLibDependencies>\n"; + } + + if (const char* javaSourceDir = + this->Target->GetProperty("ANDROID_JAVA_SOURCE_DIR")) + { + this->WriteString("<JavaSourceDir>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(javaSourceDir) << + "</JavaSourceDir>\n"; + } + + if (const char* jarDirectoriesExpression = + this->Target->GetProperty("ANDROID_JAR_DIRECTORIES")) + { + cmGeneratorExpression ge; + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(jarDirectoriesExpression); + std::string jarDirectories = cge->Evaluate(this->Makefile, configName); + this->WriteString("<JarDirectories>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(jarDirectories) << + "</JarDirectories>\n"; + } + + if (const char* jarDeps = + this->Target->GetProperty("ANDROID_JAR_DEPENDENCIES")) + { + this->WriteString("<JarDependencies>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(jarDeps) << + "</JarDependencies>\n"; + } + + if (const char* assetsDirectories = + this->Target->GetProperty("ANDROID_ASSETS_DIRECTORIES")) + { + this->WriteString("<AssetsDirectories>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(assetsDirectories) << + "</AssetsDirectories>\n"; + } + { std::string manifest_xml = rootDir + "/AndroidManifest.xml"; this->ConvertToWindowsSlash(manifest_xml); @@ -2208,6 +2329,14 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( cmVS10EscapeXML(manifest_xml) << "</AndroidManifestLocation>\n"; } + if (const char* antAdditionalOptions = + this->Target->GetProperty("ANDROID_ANT_ADDITIONAL_OPTIONS")) + { + this->WriteString("<AdditionalOptions>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(antAdditionalOptions) << + " %(AdditionalOptions)</AdditionalOptions>\n"; + } + this->WriteString("</AntBuild>\n", 2); } |