瀏覽代碼

ENH: Properly build WIN32 executables

Andy Cedilnik 22 年之前
父節點
當前提交
c7067f426f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Source/cmLocalVisualStudio7Generator.cxx

+ 3 - 3
Source/cmLocalVisualStudio7Generator.cxx

@@ -604,13 +604,13 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
         {
         fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n";
         }
-      if( target.GetType() == cmTarget::EXECUTABLE)
+      if ( target.GetPropertyAsBool("WIN32_EXECUTABLE") )
         {
-        fout << "\t\t\t\tSubSystem=\"1\"\n";
+        fout << "\t\t\t\tSubSystem=\"2\"\n";
         }
       else
         {      
-        fout << "\t\t\t\tSubSystem=\"2\"\n";
+        fout << "\t\t\t\tSubSystem=\"1\"\n";
         }
       fout << "\t\t\t\tStackReserveSize=\"" 
            << m_Makefile->GetDefinition("CMAKE_CXX_STACK_SIZE") << "\"/>\n";