aboutsummaryrefslogtreecommitdiffhomepage
path: root/gRPC-Core.podspec
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2016-06-08 20:10:20 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2016-06-08 20:10:20 -0700
commit3775074c8606f728d1d58949aaa13852701d6471 (patch)
tree99f6417a42c2d30c8209b80e64d2a5449361d4fe /gRPC-Core.podspec
parentdb502a79862c1db33da355e7c2ebaf97019132b6 (diff)
Clean up and document gRPC-Core.podspec better
Diffstat (limited to 'gRPC-Core.podspec')
-rw-r--r--gRPC-Core.podspec49
1 files changed, 29 insertions, 20 deletions
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 5d21ca94de..6411e348be 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -57,8 +57,37 @@ Pod::Spec.new do |s|
s.module_name = name
s.header_dir = name
+ s.header_mappings_dir = 'include/grpc'
+
+ src_root = '$(PODS_ROOT)/gRPC-Core'
+ # This isn't officially supported in Cocoapods. We've asked for an alternative:
+ # https://github.com/CocoaPods/CocoaPods/issues/4386
+ #
+ # The src_root value of $(PODS_ROOT)/gRPC-Core assumes Cocoapods is installing this pod from its
+ # remote repo. For local development of this library, enabled by using ":path" in the Podfile,
+ # that assumption is wrong. In such case, the following settings need to be reset with the
+ # appropriate value of src_root. This can be accomplished in the pre_install hook of the Podfile;
+ # see src/objective-c/tests/Podfile for an example.
+ public_build_settings = {
+ 'GRPC_SRC_ROOT' => src_root,
+ 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
+ }
+ private_build_settings = public_build_settings.merge({
+ 'USE_HEADERMAP' => 'NO',
+ 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+ 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
+ })
+ s.user_target_xcconfig = public_build_settings
+ s.pod_target_xcconfig = private_build_settings
+
+ s.libraries = 'z'
+ s.dependency 'BoringSSL', '~> 3.0'
+
+ # A module map is necessary for a dynamic framework to be correctly created by Cocoapods.
s.module_map = 'include/grpc/module.modulemap'
+ # List of source files generated by a template. To save you from scrolling, this is the last part
+ # of the podspec.
s.source_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h',
@@ -638,24 +667,4 @@ Pod::Spec.new do |s|
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/rpc_metric_id.h'
-
- s.header_mappings_dir = 'include/grpc'
-
- src_root = '$(PODS_ROOT)/gRPC-Core'
- # This isn't officially supported in Cocoapods. We've asked for an alternative:
- # https://github.com/CocoaPods/CocoaPods/issues/4386
- public_build_settings = {
- 'GRPC_SRC_ROOT' => src_root,
- 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
- }
- private_build_settings = public_build_settings.merge({
- 'USE_HEADERMAP' => 'NO',
- 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
- 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
- })
- s.user_target_xcconfig = public_build_settings
- s.pod_target_xcconfig = private_build_settings
-
- s.libraries = 'z'
- s.dependency 'BoringSSL', '~> 3.0'
end