summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-02 17:53:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-30 12:45:34 (GMT)
commitc12e46991e02c2ea59864512d2c1fb7c2b4b0f9d (patch)
treebdc60e946b359414bfe7c7daf10b8357c157945d /Source
parent9a4df52aa1f6736c2eceebd109240441bc3a4d6e (diff)
downloadCMake-c12e46991e02c2ea59864512d2c1fb7c2b4b0f9d.zip
CMake-c12e46991e02c2ea59864512d2c1fb7c2b4b0f9d.tar.gz
CMake-c12e46991e02c2ea59864512d2c1fb7c2b4b0f9d.tar.bz2
Add 'ANDROID_API' target property to set Android Target API
Also add a 'CMAKE_ANDROID_API' variable to set the property default.
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 1e2f75c..85bf087 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -324,6 +324,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
// Setup default property values.
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
{
+ this->SetPropertyDefault("ANDROID_API", 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 15d0980..bfabb21 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -724,6 +724,12 @@ void cmVisualStudio10TargetGenerator
ntv += toolset? toolset : "Default";
ntv += "</NdkToolchainVersion>\n";
this->WriteString(ntv.c_str(), 2);
+ if(const char* api = this->Target->GetProperty("ANDROID_API"))
+ {
+ this->WriteString("<AndroidTargetAPI>", 2);
+ (*this->BuildFileStream ) <<
+ "android-" << cmVS10EscapeXML(api) << "</AndroidTargetAPI>\n";
+ }
}
void cmVisualStudio10TargetGenerator::WriteCustomCommands()