aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/vsprojects/vs2013/grpc.sln.template28
-rw-r--r--templates/vsprojects/vs2013/vcxproj_defs.include24
2 files changed, 7 insertions, 45 deletions
diff --git a/templates/vsprojects/vs2013/grpc.sln.template b/templates/vsprojects/vs2013/grpc.sln.template
index fa32f1c52e..18dfb1af42 100644
--- a/templates/vsprojects/vs2013/grpc.sln.template
+++ b/templates/vsprojects/vs2013/grpc.sln.template
@@ -11,31 +11,13 @@ 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}"
-
-for lib in libs:
- lib.is_library = True
-for target in targets:
- target.is_library = False
-
-projects = []
-projects.extend(libs)
-projects.extend(targets)
-projects = [project for project in projects if project.get('vs_project_guid', None)]
-
-## Exclude C++ projects for now
-projects = [project for project in projects if not project.get('c++', False)]
-
-for p in projects:
- p.deps = p.get('deps',[])
-
-project_dict = dict([(p.name, p) for p in projects])
%>\
-% for project in projects:
+% for project in vsprojects:
Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}"
- % if project.deps:
+ % if project.get('deps', None):
ProjectSection(ProjectDependencies) = postProject
- % for dep in project.deps:
- ${project_dict[dep].vs_project_guid} = ${project_dict[dep].vs_project_guid}
+ % for dep in project.get('deps', []):
+ ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid}
% endfor
EndProjectSection
% endif
@@ -51,7 +33,7 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-% for project in projects:
+% for project in vsprojects:
${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32
${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32
${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/templates/vsprojects/vs2013/vcxproj_defs.include b/templates/vsprojects/vs2013/vcxproj_defs.include
index ef12c62818..e21230abb7 100644
--- a/templates/vsprojects/vs2013/vcxproj_defs.include
+++ b/templates/vsprojects/vs2013/vcxproj_defs.include
@@ -2,27 +2,7 @@
<%def name="get_configuration_type(is_library)">${'StaticLibrary' if is_library else 'Application'}</%def>\
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
<%def name="gen_project(name, libs, targets)">\
-<%
-## TODO(jtattermusch): this code is c&p from the solution template
-for lib in libs:
- lib.is_library = True
-for target in targets:
- target.is_library = False
-
-projects = []
-projects.extend(libs)
-projects.extend(targets)
-projects = [project for project in projects if project.get('vs_project_guid', None)]
-
-## Exclude C++ projects for now
-projects = [project for project in projects if not project.get('c++', False)]
-
-for p in projects:
- p.deps = p.get('deps',[])
-
-project_dict = dict([(p.name, p) for p in projects])
-%>\
-% for project in projects:
+% for project in vsprojects:
% if project.name == name:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@@ -124,7 +104,7 @@ project_dict = dict([(p.name, p) for p in projects])
<ItemGroup>
% for dep in project.deps:
<ProjectReference Include="${dep}.vcxproj">
- <Project>${project_dict[dep].vs_project_guid}</Project>
+ <Project>${vsproject_dict[dep].vs_project_guid}</Project>
</ProjectReference>
% endfor
</ItemGroup>