std::string vcproj_guid,\r
const std::vector<Dependency*>& dependencies )\r
{\r
- //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
-\r
- vector<const IfableData*> ifs_list;\r
- ifs_list.push_back ( &module.project.non_if_data );\r
- ifs_list.push_back ( &module.non_if_data );\r
+ 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
\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.00") {\r
-\r
- bool has_dependencies = false;\r
-\r
-\r
-\r
-\r
- while ( ifs_list.size() )\r
+ if ((configuration.VSProjectVersion == "7.10") || (dependencies.size() > 0)) {\r
+ fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" );\r
+ for ( size_t i = 0; i < dependencies.size(); i++ )\r
{\r
- const IfableData& data = *ifs_list.back();\r
- ifs_list.pop_back();\r
- const vector<Library*>& libs = data.libraries;\r
- for ( unsigned i = 0; i < libs.size(); i++ )\r
- {\r
- if ( !has_dependencies ) {\r
- fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" );\r
- has_dependencies = true;\r
- }\r
-\r
- fprintf ( OUT, "\t\t{%s} = {%s}\r\n", libs[i]->importedModule->guid.c_str(), libs[i]->importedModule->guid.c_str());\r
- }\r
+ Dependency& dependency = *dependencies[i];\r
+ fprintf ( OUT, "\t\t%s = %s\r\n", dependency.module.guid.c_str(), dependency.module.guid.c_str() );\r
}\r
- if ( has_dependencies )\r
- fprintf ( OUT, "\tEndProjectSection\r\n" );\r
+ fprintf ( OUT, "\tEndProjectSection\r\n" );\r
}\r
\r
fprintf ( OUT, "EndProject\r\n" );\r