| 1 |
<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 2 |
<PropertyGroup> |
| 3 |
<AssemblyName>Protobuf.MSBuild</AssemblyName> |
| 4 |
<VersionPrefix>$(GrpcCsharpVersion)</VersionPrefix> |
| 5 |
<!-- If changing targets, change also paths in Google.Protobuf.Tools.targets. --> |
| 6 |
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks> |
| 7 |
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 8 |
</PropertyGroup> |
| 9 |
|
| 10 |
<Import Project="SourceLink.csproj.include" /> |
| 11 |
|
| 12 |
<PropertyGroup Label="Asset root folders. TODO(kkm): Change with package separation."> |
| 13 |
<!-- TODO(kkm): Rework whole section when splitting packages. --> |
| 14 |
<!-- GRPC: ../../third_party/protobuf/src/google/protobuf/ --> |
| 15 |
<!-- GPB: ../src/google/protobuf/ --> |
| 16 |
<Assets_ProtoInclude>../../../third_party/protobuf/src/google/protobuf/</Assets_ProtoInclude> |
| 17 |
|
| 18 |
<!-- GPB: ../protoc/ --> |
| 19 |
<!-- GRPC: ../protoc_plugins/protoc_ --> |
| 20 |
<Assets_ProtoCompiler>../protoc_plugins/protoc_</Assets_ProtoCompiler> |
| 21 |
|
| 22 |
<!-- GRPC: ../protoc_plugins/ --> |
| 23 |
<Assets_GrpcPlugins>../protoc_plugins/</Assets_GrpcPlugins> |
| 24 |
</PropertyGroup> |
| 25 |
|
| 26 |
<PropertyGroup Condition=" '$(TargetFramework)' != 'net45' "> |
| 27 |
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants> |
| 28 |
</PropertyGroup> |
| 29 |
|
| 30 |
<PropertyGroup Label="NuGet package definition" Condition=" '$(Configuration)' == 'Release' "> |
| 31 |
<!-- TODO(kkm): Change to "build\" after splitting. --> |
| 32 |
<BuildOutputTargetFolder>build\_protobuf\</BuildOutputTargetFolder> |
| 33 |
<DevelopmentDependency>true</DevelopmentDependency> |
| 34 |
<NoPackageAnalysis>true</NoPackageAnalysis> |
| 35 |
<PackageId>Grpc.Tools</PackageId> |
| 36 |
<Authors>The gRPC Authors</Authors> |
| 37 |
<Copyright>Copyright 2018 The gRPC Authors</Copyright> |
| 38 |
<Description>gRPC and Protocol Buffer compiler for managed C# and native C++ projects. |
| 39 |
|
| 40 |
Add this package to a project that contains .proto files to be compiled to code. |
| 41 |
It contains the compilers, include files and project system integration for gRPC |
| 42 |
and Protocol buffer service description files necessary to build them on Windows, |
| 43 |
Linux and MacOS. Managed runtime is supplied separately in the Grpc.Core package.</Description> |
| 44 |
<PackageIcon>packageIcon.png</PackageIcon> |
| 45 |
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> |
| 46 |
<PackageProjectUrl>https://github.com/grpc/grpc</PackageProjectUrl> |
| 47 |
<PackageTags>gRPC RPC HTTP/2</PackageTags> |
| 48 |
</PropertyGroup> |
| 49 |
|
| 50 |
<ItemGroup> |
| 51 |
<None Include="../packageIcon.png" Pack="true" PackagePath="\"/> |
| 52 |
</ItemGroup> |
| 53 |
|
| 54 |
<ItemGroup Label="NuGet package assets"> |
| 55 |
<None Pack="true" PackagePath="build\" Include="build\**\*.xml; build\**\*.props; build\**\*.targets;" /> |
| 56 |
|
| 57 |
<!-- Protobuf assets (for Google.Protobuf.Tools) --> |
| 58 |
<_ProtoAssetName Include="any;api;descriptor;duration;empty;field_mask; |
| 59 |
source_context;struct;timestamp;type;wrappers" /> |
| 60 |
<_Asset PackagePath="build/native/include/google/protobuf/" Include="@(_ProtoAssetName->'$(Assets_ProtoInclude)%(Identity).proto')" /> |
| 61 |
|
| 62 |
<!-- TODO(kkm): GPB builds assets into "macosx", GRPC into "macos". --> |
| 63 |
<!-- TODO(kkm): Do not place non-tools under tools/, use build/native/bin/. --> |
| 64 |
<!-- TODO(kkm): Do not package windows x64 builds (#13098). --> |
| 65 |
<_Asset PackagePath="tools/windows_x86/" Include="$(Assets_ProtoCompiler)windows_x86/protoc.exe" /> |
| 66 |
<_Asset PackagePath="tools/windows_x64/" Include="$(Assets_ProtoCompiler)windows_x64/protoc.exe" /> |
| 67 |
<_Asset PackagePath="tools/linux_x86/" Include="$(Assets_ProtoCompiler)linux_x86/protoc" /> |
| 68 |
<_Asset PackagePath="tools/linux_x64/" Include="$(Assets_ProtoCompiler)linux_x64/protoc" /> |
| 69 |
<_Asset PackagePath="tools/linux_arm64/" Include="$(Assets_ProtoCompiler)linux_aarch64/protoc" /> |
| 70 |
<_Asset PackagePath="tools/macosx_x64/" Include="$(Assets_ProtoCompiler)macos_x64/protoc" /> <!-- GPB: macosx--> |
| 71 |
|
| 72 |
<!-- gRPC assets (for Grpc.Tools) --> |
| 73 |
<_Asset PackagePath="tools/windows_x86/" Include="$(Assets_GrpcPlugins)protoc_windows_x86/grpc_csharp_plugin.exe" /> |
| 74 |
<_Asset PackagePath="tools/windows_x64/" Include="$(Assets_GrpcPlugins)protoc_windows_x64/grpc_csharp_plugin.exe" /> |
| 75 |
<_Asset PackagePath="tools/linux_x86/" Include="$(Assets_GrpcPlugins)protoc_linux_x86/grpc_csharp_plugin" /> |
| 76 |
<_Asset PackagePath="tools/linux_x64/" Include="$(Assets_GrpcPlugins)protoc_linux_x64/grpc_csharp_plugin" /> |
| 77 |
<_Asset PackagePath="tools/linux_arm64/" Include="$(Assets_GrpcPlugins)protoc_linux_aarch64/grpc_csharp_plugin" /> |
| 78 |
<_Asset PackagePath="tools/macosx_x64/" Include="$(Assets_GrpcPlugins)protoc_macos_x64/grpc_csharp_plugin" /> |
| 79 |
|
| 80 |
<None Include="@(_Asset)" Pack="true" Visible="false" /> |
| 81 |
</ItemGroup> |
| 82 |
|
| 83 |
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' "> |
| 84 |
<Reference Include="Microsoft.Build.Framework; Microsoft.Build.Utilities.v4.0" Pack="false" /> |
| 85 |
</ItemGroup> |
| 86 |
|
| 87 |
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' "> |
| 88 |
<PackageReference Include="Microsoft.Build.Framework; Microsoft.Build.Utilities.Core" Version="15.6.*" /> |
| 89 |
<!-- Set PrivateAssets="All" on all items, even those implicitly added, |
| 90 |
so that they do not become dependencies of this package. --> |
| 91 |
<PackageReference Update="@(PackageReference)" PrivateAssets="All" /> |
| 92 |
</ItemGroup> |
| 93 |
|
| 94 |
</Project> |