[cmake-developers] [PATCH] VS12: Allow specifying an installed SDK as target platform for the generator.

Pascal Bach pascal.bach at siemens.com
Thu Aug 28 08:52:41 EDT 2014


This brings the behavior of Visual Studio 2013 in line with the one of Visual Studio 2012.
---
 Source/cmGlobalVisualStudio12Generator.cxx |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 29ecfe0..08a2b7b 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -60,7 +60,19 @@ public:
       return new cmGlobalVisualStudio12Generator(
         genName, "ARM");
       }
-    return 0;
+
+    std::set<std::string> installedSDKs =
+      cmGlobalVisualStudio12Generator::GetInstalledWindowsCESDKs();
+
+    if(installedSDKs.find(p) == installedSDKs.end())
+      {
+      return 0;
+      }
+
+    cmGlobalVisualStudio12Generator* ret =
+      new cmGlobalVisualStudio12Generator(name, p);
+    ret->WindowsCEVersion = "8.00";
+    return ret;
     }
 
   virtual void GetDocumentation(cmDocumentationEntry& entry) const
@@ -74,6 +86,13 @@ public:
     names.push_back(vs12generatorName);
     names.push_back(vs12generatorName + std::string(" ARM"));
     names.push_back(vs12generatorName + std::string(" Win64"));
+    std::set<std::string> installedSDKs =
+      cmGlobalVisualStudio12Generator::GetInstalledWindowsCESDKs();
+    for(std::set<std::string>::const_iterator i =
+        installedSDKs.begin(); i != installedSDKs.end(); ++i)
+      {
+      names.push_back(std::string(vs12generatorName) + " " + *i);
+      }
     }
 };
 
-- 
1.7.10.4



More information about the cmake-developers mailing list