RemoteTestCpp.podspec 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Pod::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. s.ios.deployment_target = '9.0'
  10. s.osx.deployment_target = '10.10'
  11. # Run protoc with the C++ and gRPC plugins to generate protocol messages and gRPC clients.
  12. s.dependency "!ProtoCompiler-gRPCCppPlugin"
  13. s.dependency "Protobuf-C++"
  14. s.dependency "gRPC-C++"
  15. s.source_files = "src/proto/grpc/testing/*.pb.{h,cc}"
  16. s.header_mappings_dir = "."
  17. s.requires_arc = false
  18. repo_root = '../../../..'
  19. bazel_exec_root = "#{repo_root}/bazel-out/darwin-fastbuild/bin"
  20. protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc"
  21. well_known_types_dir = "#{repo_root}/third_party/protobuf/src"
  22. plugin = "#{bazel_exec_root}/src/compiler/grpc_cpp_plugin"
  23. proto_dir = "#{repo_root}/src/proto/grpc/testing"
  24. s.prepare_command = <<-CMD
  25. #{protoc} \
  26. --plugin=protoc-gen-grpc=#{plugin} \
  27. --cpp_out=. \
  28. --grpc_out=. \
  29. -I #{repo_root} \
  30. -I #{well_known_types_dir} \
  31. #{proto_dir}/echo.proto #{proto_dir}/echo_messages.proto #{proto_dir}/simple_messages.proto
  32. CMD
  33. s.pod_target_xcconfig = {
  34. # This is needed by all pods that depend on Protobuf:
  35. 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1',
  36. # This is needed by all pods that depend on gRPC-RxLibrary:
  37. 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
  38. }
  39. end