From 69ef8b4b427b8fce15b004e51afb4fa2fcd08d71 Mon Sep 17 00:00:00 2001
From: Mark Salisbury <mark.salisbury@hp.com>
Date: Wed, 13 Feb 2013 09:48:32 -0700
Subject: [PATCH 2/2] [WinCE] Adding support for Visual Studio 2008.

---
 Source/cmLocalVisualStudio7Generator.cxx | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 620e9b3..f07ebef 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1136,7 +1136,14 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       }
     if(this->WindowsCEProject)
       {
-      fout << "\t\t\t\tSubSystem=\"9\"\n";
+      if(this->GetVersion() < VS9)
+        {
+        fout << "\t\t\t\tSubSystem=\"9\"\n";
+        }
+      else
+        {
+        fout << "\t\t\t\tSubSystem=\"8\"\n";
+        }
       }
     std::string stackVar = "CMAKE_";
     stackVar += linkLanguage;
@@ -1227,8 +1234,15 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
       }
     if ( this->WindowsCEProject )
       {
-      fout << "\t\t\t\tSubSystem=\"9\"\n"
-           << "\t\t\t\tEntryPointSymbol=\""
+      if(this->GetVersion() < VS9)
+        {
+        fout << "\t\t\t\tSubSystem=\"9\"\n";
+        }
+      else
+        {
+        fout << "\t\t\t\tSubSystem=\"8\"\n";
+        }
+      fout << "\t\t\t\tEntryPointSymbol=\""
            << (isWin32Executable ? "WinMainCRTStartup" : "mainACRTStartup")
            << "\"\n";
       }
-- 
1.7.11.msysgit.1

