From ff711456dc2394745d9d60f1985af1532cb418d4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 2 Jun 2016 09:47:19 -0700 Subject: Automatically capture transitive dependencies for Visual Studio solution files --- templates/vsprojects/sln_defs.include | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'templates/vsprojects/sln_defs.include') diff --git a/templates/vsprojects/sln_defs.include b/templates/vsprojects/sln_defs.include index a0489411c6..cc525781a0 100644 --- a/templates/vsprojects/sln_defs.include +++ b/templates/vsprojects/sln_defs.include @@ -1,4 +1,4 @@ -<%def name="gen_solution(solution_projects, use_dlls = 'no')">\ +<%def name="gen_solution(solution_top_level_projects, use_dlls = 'no')">\ ## Template for Visual Studio solution ## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx ## NOTE: tabs in this file are needed by Visual Studio to correctly interpret @@ -12,6 +12,14 @@ MinimumVisualStudioVersion = 10.0.40219.1 ## Visual Studio uses GUIDs for project types ## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" + +all_projects = set() +for project in solution_top_level_projects: + for dep in project.deps: + all_projects.add(dep) + all_projects.add(project.name) + +solution_projects = [vsproject_dict[project] for project in sorted(list(all_projects))] %>\ % for project in solution_projects: Project("${cpp_proj_type}") = "${project.name}", "vcxproj\${project.vs_proj_dir}\${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}" -- cgit v1.2.3