diff options
Diffstat (limited to 'templates/vsprojects')
10 files changed, 74 insertions, 47 deletions
diff --git a/templates/vsprojects/grpc.sln.template b/templates/vsprojects/grpc.sln.template index 7465852e70..70be6b4f7a 100644 --- a/templates/vsprojects/grpc.sln.template +++ b/templates/vsprojects/grpc.sln.template @@ -1,48 +1,5 @@ -## 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 -## the file. - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 +<%namespace file="sln_defs.include" import="gen_solution"/>\ <% -## 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}" +solution_projects = [p for p in vsprojects if p.build != 'protoc'] %>\ -% for project in vsprojects: -Project("${cpp_proj_type}") = "${project.name}", "${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}" - % if project.get('deps', None): - ProjectSection(ProjectDependencies) = postProject - % for dep in project.get('deps', []): - ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid} - % endfor - EndProjectSection - % endif -EndProject -% endfor -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution -% 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}.Debug|x64.ActiveCfg = Debug|x64 - ${project.vs_project_guid}.Debug|x64.Build.0 = Debug|x64 - ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 - ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 - ${project.vs_project_guid}.Release|x64.ActiveCfg = Release|x64 - ${project.vs_project_guid}.Release|x64.Build.0 = Release|x64 -% endfor - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +${gen_solution(solution_projects)}
\ No newline at end of file diff --git a/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template b/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template new file mode 100644 index 0000000000..49ab1b7385 --- /dev/null +++ b/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_cpp_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template b/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template new file mode 100644 index 0000000000..9d94e27c3a --- /dev/null +++ b/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_csharp_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template b/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template new file mode 100644 index 0000000000..794c7310c5 --- /dev/null +++ b/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_objective_c_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template b/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template new file mode 100644 index 0000000000..409e88f289 --- /dev/null +++ b/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_plugin_support', libs)} diff --git a/templates/vsprojects/grpc_protoc_plugins.sln.template b/templates/vsprojects/grpc_protoc_plugins.sln.template new file mode 100644 index 0000000000..1c171f4f94 --- /dev/null +++ b/templates/vsprojects/grpc_protoc_plugins.sln.template @@ -0,0 +1,5 @@ +<%namespace file="sln_defs.include" import="gen_solution"/>\ +<% +solution_projects = [p for p in vsprojects if p.build == 'protoc'] +%>\ +${gen_solution(solution_projects)}
\ No newline at end of file diff --git a/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template b/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template new file mode 100644 index 0000000000..977e015d6d --- /dev/null +++ b/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_python_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template b/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template new file mode 100644 index 0000000000..ecf42ae04e --- /dev/null +++ b/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_ruby_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/sln_defs.include b/templates/vsprojects/sln_defs.include new file mode 100644 index 0000000000..ee05d0fbde --- /dev/null +++ b/templates/vsprojects/sln_defs.include @@ -0,0 +1,50 @@ +<%def name="gen_solution(solution_projects)">\ +## 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 +## the file. + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +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 project in solution_projects: +Project("${cpp_proj_type}") = "${project.name}", "${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}" + % if project.get('deps', None): + ProjectSection(ProjectDependencies) = postProject + % for dep in project.get('deps', []): + ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid} + % endfor + EndProjectSection + % endif +EndProject +% endfor +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +% for project in solution_projects: + ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 + ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 + ${project.vs_project_guid}.Debug|x64.ActiveCfg = Debug|x64 + ${project.vs_project_guid}.Debug|x64.Build.0 = Debug|x64 + ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 + ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 + ${project.vs_project_guid}.Release|x64.ActiveCfg = Release|x64 + ${project.vs_project_guid}.Release|x64.Build.0 = Release|x64 +% endfor + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal +</%def>\
\ No newline at end of file diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include index 87412debda..55ec37393f 100644 --- a/templates/vsprojects/vcxproj_defs.include +++ b/templates/vsprojects/vcxproj_defs.include @@ -19,7 +19,10 @@ if not project_guid: project_guid = project.vs_project_guid if configuration_type == 'Application': - props.extend(['winsock', 'protobuf', 'zlib', 'openssl']) + if target.build == 'protoc': + props.extend(['protoc']) + else: + props.extend(['winsock', 'protobuf', 'zlib', 'openssl']) if target.language == 'c++': props.extend(['protobuf']) props.extend(['global']) |