Subspec for C++ protobuf

pull/15847/head
Muxi Yan 7 years ago
parent 06cc5b583a
commit 6443601337
  1. 13
      gRPC-C++.podspec
  2. 10
      templates/gRPC-C++.podspec.template

@ -24,7 +24,7 @@ Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
# version = '1.14.0-dev'
version = '0.0.2'
version = '0.0.3'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
@ -664,6 +664,17 @@ Pod::Spec.new do |s|
'src/core/ext/transport/inproc/inproc_transport.h'
end
s.subspec 'Protobuf' do |ss|
ss.header_mappings_dir = 'include/grpcpp'
ss.dependency "#{s.name}/Interface", version
ss.source_files = 'include/grpcpp/impl/codegen/proto_buffer_reader.h',
'include/grpcpp/impl/codegen/proto_buffer_writer.h',
'include/grpcpp/impl/codegen/proto_utils.h',
'include/grpcpp/impl/codegen/config_protobuf.h',
'include/grpcpp/impl/codegen/config_protobuf.h'
end
s.prepare_command = <<-END_OF_COMMAND
find src/cpp/ -type f ! -path '*.grpc_back' -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(pb(_.*)?\\.h)";#include <nanopb/\\1>;g'
find src/cpp/ -type f -path '*.grpc_back' -print0 | xargs -0 rm

@ -49,6 +49,7 @@
out = grpc_lib_files(filegroups, ("grpc++_codegen_proto", "grpc++_config_proto"), ("headers", "src", "public_headers"))
excl_files = grpc_lib_files(filegroups, ("grpc++_codegen_base",), ("headers", "src", "public_headers"))
out = [file for file in out if file not in excl_files]
out = filter_grpcpp(out)
return out
def grpcpp_private_files(libs, filegroups):
@ -131,7 +132,7 @@
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
# version = '${settings.version}'
version = '0.0.2'
version = '0.0.3'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
@ -195,6 +196,13 @@
ss.private_header_files = ${ruby_multiline_list(grpcpp_private_headers(libs, filegroups), 30)}
end
s.subspec 'Protobuf' do |ss|
ss.header_mappings_dir = 'include/grpcpp'
ss.dependency "#{s.name}/Interface", version
ss.source_files = ${ruby_multiline_list(grpcpp_proto_files(filegroups), 22)}
end
s.prepare_command = <<-END_OF_COMMAND
find src/cpp/ -type f ! -path '*.grpc_back' -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(pb(_.*)?\\.h)";#include <nanopb/\\1>;g'
find src/cpp/ -type f -path '*.grpc_back' -print0 | xargs -0 rm

Loading…
Cancel
Save