diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-01-15 06:47:41 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-01-15 06:49:36 +0100 |
commit | cc0994c8cbd302aa99483e42d6d2855b0cd59fd4 (patch) | |
tree | a67ad22adb910104ae36b90c0cfaf90bea8c52d6 /templates | |
parent | b876c68bcc7e9a6cd553bc687a4e696fe7eafa36 (diff) |
Factoring visual studio code into a buildgen plugin.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/vsprojects/vs2013/grpc.sln.template | 28 | ||||
-rw-r--r-- | templates/vsprojects/vs2013/vcxproj_defs.include | 24 |
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> |