diff options
author | Jon Skeet <skeet@pobox.com> | 2011-05-23 14:29:03 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2011-05-23 14:29:03 +0100 |
commit | da4989c4ed04c92f71553dd6a73abb3d25869d7a (patch) | |
tree | 27a47ca7c80b32cfdbbc55eeeb7925b9e17c70a9 /build | |
parent | 445bdcebe78994f09a97fcc95721703c14f1172b (diff) | |
download | protobuf-da4989c4ed04c92f71553dd6a73abb3d25869d7a.tar.gz protobuf-da4989c4ed04c92f71553dd6a73abb3d25869d7a.tar.bz2 protobuf-da4989c4ed04c92f71553dd6a73abb3d25869d7a.zip |
Allow protoc to be targeted by protogen explicitly.
Use that within the build for the address book sample.
Diffstat (limited to 'build')
-rw-r--r-- | build/Common.targets | 2 | ||||
-rw-r--r-- | build/build.csproj | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/build/Common.targets b/build/Common.targets index 59f431bd..7e65b75f 100644 --- a/build/Common.targets +++ b/build/Common.targets @@ -27,6 +27,8 @@ <Target Name="_GenerateSource"> <Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb @(Protos->'%(RelativeDir)%(Filename)%(Extension)', ' ')" WorkingDirectory="$(BuildTempDirectory)" /> <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" /> + <!-- Generate the AddressBookProtos.cs directly --> + <Exec Command="$(ProtogenExePath) --protoc_dir=$(LibDirectory) --proto_path=$(ProtosDirectory) $(ProtosDirectory)\tutorial\addressbook.proto -namespace=Google.ProtocolBuffers.Examples.AddressBook -umbrella_classname=AddressBookProtos" WorkingDirectory="$(BuildTempDirectory)" /> </Target> <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource"> diff --git a/build/build.csproj b/build/build.csproj index b6edf2b9..a0fcefa2 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -54,9 +54,8 @@ <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_mset.proto" /> <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_no_generic_services.proto" /> <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto" /> - <Protos Include="$(ProtosDirectory)\tutorial\addressbook.proto" /> - <!-- Main protos --> + <!-- Main protos --> <GeneratedSource Include="$(BuildTempDirectory)\CSharpOptions.cs"> <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory> </GeneratedSource> @@ -64,7 +63,7 @@ <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory> </GeneratedSource> - <!-- Address book sample --> + <!-- Address book sample --> <GeneratedSource Include="$(BuildTempDirectory)\AddressBookProtos.cs"> <TargetDirectory>$(SourceDirectory)\AddressBook</TargetDirectory> </GeneratedSource> |