| 1 |
<?xml version="1.0"?> |
| 2 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 3 |
<PropertyGroup> |
| 4 |
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> |
| 5 |
<gRPC_PluginFileName Condition=" '$(gRPC_PluginFileName)' == '' and '$(Language)' == 'C#' ">grpc_csharp_plugin</gRPC_PluginFileName> |
| 6 |
</PropertyGroup> |
| 7 |
|
| 8 |
<ItemGroup Condition=" '$(Protobuf_ProjectSupported)' == 'true' and '$(Language)' == 'C#' "> |
| 9 |
<!-- Extend property pages with gRPC properties. --> |
| 10 |
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Grpc.CSharp.xml"> |
| 11 |
<Context>File;BrowseObject</Context> |
| 12 |
</PropertyPageSchema> |
| 13 |
</ItemGroup> |
| 14 |
|
| 15 |
<ItemDefinitionGroup Condition=" '$(Protobuf_ProjectSupported)' == 'true' and '$(Language)' == 'C#' "> |
| 16 |
<Protobuf> |
| 17 |
<GrpcServices Condition=" '%(Protobuf.GrpcServices)' == '' ">Both</GrpcServices> |
| 18 |
</Protobuf> |
| 19 |
</ItemDefinitionGroup> |
| 20 |
|
| 21 |
<!-- This target is invoked in a C# project, or can be called in a customized project. --> |
| 22 |
<Target Name="gRPC_ResolvePluginFullPath" AfterTargets="Protobuf_ResolvePlatform"> |
| 23 |
<PropertyGroup> |
| 24 |
<!-- TODO(kkm): Do not use Protobuf_PackagedToolsPath, roll gRPC's own. --> |
| 25 |
|
| 26 |
<!-- First try environment variable. --> |
| 27 |
<gRPC_PluginFullPath Condition=" '$(gRPC_PluginFullPath)' == '' ">$(GRPC_PROTOC_PLUGIN)</gRPC_PluginFullPath> |
| 28 |
|
| 29 |
<gRPC_PluginFullPath Condition=" '$(gRPC_PluginFullPath)' == '' and '$(Protobuf_ToolsOs)' == 'windows' " |
| 30 |
>$(Protobuf_PackagedToolsPath)\$(Protobuf_ToolsOs)_$(Protobuf_ToolsCpu)\$(gRPC_PluginFileName).exe</gRPC_PluginFullPath> |
| 31 |
<gRPC_PluginFullPath Condition=" '$(gRPC_PluginFullPath)' == '' " |
| 32 |
>$(Protobuf_PackagedToolsPath)/$(Protobuf_ToolsOs)_$(Protobuf_ToolsCpu)/$(gRPC_PluginFileName)</gRPC_PluginFullPath> |
| 33 |
</PropertyGroup> |
| 34 |
</Target> |
| 35 |
|
| 36 |
<Target Name="_gRPC_PrepareCompileOptions" AfterTargets="Protobuf_PrepareCompileOptions"> |
| 37 |
<ItemGroup Condition=" '$(Language)' == 'C#' "> |
| 38 |
<Protobuf_Compile Condition=" %(Protobuf_Compile.GrpcServices) != 'None' "> |
| 39 |
<GrpcPluginExe Condition=" '%(Protobuf_Compile.GrpcPluginExe)' == '' ">$(gRPC_PluginFullPath)</GrpcPluginExe> |
| 40 |
<GrpcOutputDir Condition=" '%(Protobuf_Compile.GrpcOutputDir)' == '' " >%(Protobuf_Compile.OutputDir)</GrpcOutputDir> |
| 41 |
<_GrpcOutputOptions Condition=" '%(Protobuf_Compile.Access)' == 'Internal' ">%(Protobuf_Compile._GrpcOutputOptions);internal_access</_GrpcOutputOptions> |
| 42 |
</Protobuf_Compile> |
| 43 |
<Protobuf_Compile Condition=" '%(Protobuf_Compile.GrpcServices)' == 'Client' "> |
| 44 |
<_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_server</_GrpcOutputOptions> |
| 45 |
</Protobuf_Compile> |
| 46 |
<Protobuf_Compile Condition=" '%(Protobuf_Compile.GrpcServices)' == 'Server' "> |
| 47 |
<_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_client</_GrpcOutputOptions> |
| 48 |
</Protobuf_Compile> |
| 49 |
</ItemGroup> |
| 50 |
</Target> |
| 51 |
</Project> |