• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Pod::Spec.new do |s|
2  s.name     = "RemoteTestCpp"
3  s.version  = "0.0.1"
4  s.license  = "Apache License, Version 2.0"
5  s.authors  = { 'gRPC contributors' => 'grpc-io@googlegroups.com' }
6  s.homepage = "https://grpc.io/"
7  s.summary = "RemoteTest example"
8  s.source = { :git => 'https://github.com/grpc/grpc.git' }
9
10  s.ios.deployment_target = '7.1'
11  s.osx.deployment_target = '10.9'
12
13  # Run protoc with the C++ and gRPC plugins to generate protocol messages and gRPC clients.
14  s.dependency "!ProtoCompiler-gRPCCppPlugin"
15  s.dependency "Protobuf-C++"
16  s.dependency "gRPC-C++"
17  s.source_files = "src/proto/grpc/testing/*.pb.{h,cc}"
18  s.header_mappings_dir = "."
19  s.requires_arc = false
20
21  repo_root = '../../../..'
22  bazel_exec_root = "#{repo_root}/bazel-out/darwin-fastbuild/bin"
23
24  protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc"
25  well_known_types_dir = "#{repo_root}/third_party/protobuf/src"
26  plugin = "#{bazel_exec_root}/src/compiler/grpc_cpp_plugin"
27  proto_dir = "#{repo_root}/src/proto/grpc/testing"
28
29  s.prepare_command = <<-CMD
30    #{protoc} \
31        --plugin=protoc-gen-grpc=#{plugin} \
32        --cpp_out=. \
33        --grpc_out=. \
34        -I #{repo_root} \
35        -I #{well_known_types_dir} \
36        #{proto_dir}/echo.proto #{proto_dir}/echo_messages.proto #{proto_dir}/simple_messages.proto
37  CMD
38
39  s.pod_target_xcconfig = {
40    # This is needed by all pods that depend on Protobuf:
41    'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1',
42    # This is needed by all pods that depend on gRPC-RxLibrary:
43    'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
44  }
45end
46