summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDmitry Polyanitsa <dpolyanitsa@nvidia.com>2014-12-17 14:11:51 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-17 16:17:28 (GMT)
commiteeaa25e52144626dc76717dea37af3b8d20cb171 (patch)
tree8489421493f714470a3b94bf9f94335e309f00ac /Source
parent1b3ab3318dcdabe074da3c95b54f9483d47f95be (diff)
downloadCMake-eeaa25e52144626dc76717dea37af3b8d20cb171.zip
CMake-eeaa25e52144626dc76717dea37af3b8d20cb171.tar.gz
CMake-eeaa25e52144626dc76717dea37af3b8d20cb171.tar.bz2
Add 'ANDROID_API_MIN' target property to set Android Target MIN API
Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property default. Teach the VS generator to write the MIN API value into Nsight Tegra project files.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx1
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 37aa26e..865a824 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -325,6 +325,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
{
this->SetPropertyDefault("ANDROID_API", 0);
+ this->SetPropertyDefault("ANDROID_API_MIN", 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 f903bdb..b265c0e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -748,6 +748,12 @@ void cmVisualStudio10TargetGenerator
ntv += toolset? toolset : "Default";
ntv += "</NdkToolchainVersion>\n";
this->WriteString(ntv.c_str(), 2);
+ if(const char* minApi = this->Target->GetProperty("ANDROID_API_MIN"))
+ {
+ this->WriteString("<AndroidMinAPI>", 2);
+ (*this->BuildFileStream ) <<
+ "android-" << cmVS10EscapeXML(minApi) << "</AndroidMinAPI>\n";
+ }
if(const char* api = this->Target->GetProperty("ANDROID_API"))
{
this->WriteString("<AndroidTargetAPI>", 2);