create more correct solution files for different versions of MS Visual Studio
authorChristoph von Wittich <christoph_vw@reactos.org>
Thu, 20 Oct 2005 12:42:09 +0000 (12:42 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Thu, 20 Oct 2005 12:42:09 +0000 (12:42 +0000)
svn path=/trunk/; revision=18626

reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp

index 1f2c300..fe8fc94 100644 (file)
@@ -441,8 +441,14 @@ MSVCBackend::_generate_sln_project (
        vcproj_file = DosSeparator ( std::string(".\\") + vcproj_file );\r
 \r
        fprintf ( OUT, "Project(\"%s\") = \"%s\", \"%s\", \"%s\"\r\n", sln_guid.c_str() , module.name.c_str(), vcproj_file.c_str(), vcproj_guid.c_str() );\r
-       fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" );\r
-       fprintf ( OUT, "\tEndProjectSection\r\n" );\r
+\r
+       //FIXME: only omit ProjectDependencies in VS 2005 when there are no dependencies\r
+       //NOTE: VS 2002 do not use ProjectSection; it uses GlobalSection instead\r
+       if (configuration.VSProjectVersion == "7.10") {\r
+               fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" );\r
+               fprintf ( OUT, "\tEndProjectSection\r\n" );\r
+       }\r
+\r
        fprintf ( OUT, "EndProject\r\n" );\r
 }\r
 \r
@@ -467,10 +473,21 @@ MSVCBackend::_generate_sln_footer ( FILE* OUT )
        fprintf ( OUT, "\tEndGlobalSection\r\n" );\r
        fprintf ( OUT, "\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n" );\r
        fprintf ( OUT, "\tEndGlobalSection\r\n" );\r
-       fprintf ( OUT, "EndGlobal\r\n" );\r
 \r
+       \r
+       if (configuration.VSProjectVersion == "7.00") {\r
+               fprintf ( OUT, "\tGlobalSection(ProjectDependencies) = postSolution\r\n" );\r
+               fprintf ( OUT, "\tEndGlobalSection\r\n" );\r
+       }\r
 \r
-    fprintf ( OUT, "\r\n" );\r
+       if (configuration.VSProjectVersion == "8.00") {\r
+               fprintf ( OUT, "\tGlobalSection(SolutionProperties) = preSolution\r\n" );\r
+               fprintf ( OUT, "\t\tHideSolutionNode = FALSE\r\n" );\r
+               fprintf ( OUT, "\tEndGlobalSection\r\n" );\r
+       }\r
+\r
+       fprintf ( OUT, "EndGlobal\r\n" );\r
+       fprintf ( OUT, "\r\n" );\r
 }\r
 \r
 \r