summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBenjamín de la Fuente Ranea <yosoymin@gmail.com>2022-06-08 04:37:20 (GMT)
committerBrad King <brad.king@kitware.com>2022-06-08 13:17:20 (GMT)
commit9d6a080421e19a896aebfa8fe68160b456ea61eb (patch)
treecfad9b3910c4cb4601502d5a5cc9a4d2095d4dc7 /Source
parent031fa14b7eab1e85882eb5a9e10cb8f7f66c1350 (diff)
downloadCMake-9d6a080421e19a896aebfa8fe68160b456ea61eb.zip
CMake-9d6a080421e19a896aebfa8fe68160b456ea61eb.tar.gz
CMake-9d6a080421e19a896aebfa8fe68160b456ea61eb.tar.bz2
VS: Add AndroidAPILevel element to generated project files
Map `CMAKE_SYSTEM_VERSION` to the Android Target API Level for Visual Studio projects. Fixes: #22886
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 60b89df..c79331c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1639,6 +1639,10 @@ void cmVisualStudio10TargetGenerator::WriteAndroidConfigurationValues(
e1.Element("UseOfStl", *stlType);
}
}
+ std::string const& apiLevel = gg->GetSystemVersion();
+ if (!apiLevel.empty()) {
+ e1.Element("AndroidAPILevel", cmStrCat("android-", apiLevel));
+ }
}
void cmVisualStudio10TargetGenerator::WriteCustomCommands(Elem& e0)