mirror of https://github.com/grpc/grpc.git
parent
8ab4538343
commit
b5bf574e0c
12 changed files with 103 additions and 41 deletions
@ -1,2 +1,2 @@ |
||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||
${gen_project('grpc', libs, targets, openssl_pkg_version='1.0.2.1', zlib_pkg_version='1.2.8.7')} |
||||
${gen_project('grpc', libs, targets, packages=['openssl','zlib'])} |
@ -1,2 +1,2 @@ |
||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', additional_props = ['winsock'], openssl_pkg_version='1.0.2.1', zlib_pkg_version='1.2.8.7')} |
||||
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', additional_props = ['winsock'], packages=['openssl','zlib'])} |
||||
|
@ -1,2 +1,2 @@ |
||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||
${gen_project('grpc_unsecure', libs, targets, zlib_pkg_version='1.2.8.7')} |
||||
${gen_project('grpc_unsecure', libs, targets, packages=['zlib'])} |
@ -1,13 +1,51 @@ |
||||
<%! |
||||
openssl_pkg_name = "openssl" |
||||
openssl_pkg_version = "1.0.2.1" |
||||
zlib_pkg_version = "1.2.8.7" |
||||
%>\ |
||||
<%def name="gen_packages_config(packages)">\ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<packages> |
||||
% if 'openssl' in packages: |
||||
<package id="openssl" version="1.0.2.1" targetFramework="Native" /> |
||||
<package id="openssl.redist" version="1.0.2.1" targetFramework="Native" /> |
||||
<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" version="1.2.8.7" targetFramework="Native" /> |
||||
<package id="zlib.redist" version="1.2.8.7" targetFramework="Native" /> |
||||
<package id="zlib" version="${zlib_pkg_version}" targetFramework="Native" /> |
||||
<package id="zlib.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.redist.${zlib_pkg_version}\build\native\zlib.redist.targets" Condition="Exists('..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets')" /> |
||||
<Import Project="..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets" Condition="Exists('..\packages\zlib.${zlib_pkg_version}\build\native\zlib.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.redist.${zlib_pkg_version}\build\native\zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets'))" /> |
||||
<Error Condition="!Exists('..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.${zlib_pkg_version}\build\native\zlib.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>\ |
||||
|
Loading…
Reference in new issue