forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request grpc#1263 from jtattermusch/use_openssl_nuget
Refactoring of VS projects, start using nuget dependencies for OpenSSL and zlib on Windows.
- Loading branch information
Showing
101 changed files
with
603 additions
and
9,360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="grpc.dependencies.openssl.redist" version="1.0.2.2" targetFramework="net45" /> | ||
<package id="grpc.dependencies.zlib.redist" version="1.2.8.9" targetFramework="net45" /> | ||
<package id="System.Collections.Immutable" version="1.1.34-rc" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ | ||
${gen_filters('gpr', libs, targets)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('gpr', libs, targets)} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('gpr_test_util', libs, targets)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ | ||
${gen_filters('grpc++', libs, targets)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('grpc++', libs, targets)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## 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 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 | ||
Release|Win32 = Release|Win32 | ||
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}.Release|Win32.ActiveCfg = Release|Win32 | ||
${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 | ||
% endfor | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ | ||
${gen_filters('grpc', libs, targets)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('grpc', libs, targets, packages=['openssl','zlib'])} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../packages.include" import="gen_packages_config"/>\ | ||
${gen_packages_config(['openssl','zlib'])} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', additional_props = ['winsock'], packages=['openssl','zlib'])} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/grpc_csharp_ext/packages.config.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../packages.include" import="gen_packages_config"/>\ | ||
${gen_packages_config(['openssl','zlib'])} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('grpc_test_util', libs, targets)} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ | ||
${gen_filters('grpc_unsecure', libs, targets)} |
2 changes: 2 additions & 0 deletions
2
templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ | ||
${gen_project('grpc_unsecure', libs, targets, packages=['zlib'])} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%namespace file="../packages.include" import="gen_packages_config"/>\ | ||
${gen_packages_config(['zlib'])} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<%! | ||
openssl_pkg_name = "grpc.dependencies.openssl" | ||
openssl_pkg_version = "1.0.2.2" | ||
zlib_pkg_name = "grpc.dependencies.zlib" | ||
zlib_pkg_version = "1.2.8.9" | ||
%>\ | ||
<%def name="get_openssl()">${openssl_pkg_name}.${openssl_pkg_version}</%def>\ | ||
<%def name="get_zlib()">${zlib_pkg_name}.${zlib_pkg_version}</%def>\ | ||
<%def name="gen_packages_config(packages)">\ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
% if 'openssl' in packages: | ||
<package id="${openssl_pkg_name}" version="${openssl_pkg_version}" targetFramework="Native" /> | ||
<package id="${openssl_pkg_name}.redist" version="${openssl_pkg_version}" targetFramework="Native" /> | ||
% endif | ||
% if 'zlib' in packages: | ||
<package id="${zlib_pkg_name}" version="${zlib_pkg_version}" targetFramework="Native" /> | ||
<package id="${zlib_pkg_name}.redist" version="${zlib_pkg_version}" targetFramework="Native" /> | ||
% endif | ||
</packages> | ||
</%def>\ | ||
<%def name="gen_package_props(packages)">\ | ||
% if 'openssl' in packages: | ||
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" /> | ||
% endif | ||
</%def>\ | ||
<%def name="gen_package_targets(packages)">\ | ||
% if 'zlib' in packages: | ||
<Import Project="..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets" Condition="Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" /> | ||
<Import Project="..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets" Condition="Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" /> | ||
%endif | ||
% if 'openssl' in packages: | ||
<Import Project="..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets" Condition="Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" /> | ||
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" /> | ||
% endif | ||
</%def>\ | ||
<%def name="gen_package_ensure(packages)">\ | ||
% if packages: | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
% if 'zlib' in packages: | ||
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets'))" /> | ||
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets'))" /> | ||
%endif | ||
% if 'openssl' in packages: | ||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets'))" /> | ||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props'))" /> | ||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets'))" /> | ||
%endif | ||
</Target> | ||
%endif | ||
</%def>\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.