Imported Upstream version 1.33.0
[platform/upstream/grpc.git] / src / objective-c / examples / watchOS-sample / Podfile
1 install! 'cocoapods', :deterministic_uuids => false
2
3 use_frameworks! if ENV['FRAMEWORKS'] != 'NO'
4
5 ROOT_DIR = '../../../..'
6
7 def grpc_deps
8   pod 'gRPC-ProtoRPC', :path => ROOT_DIR
9   pod 'gRPC', :path => ROOT_DIR
10   pod 'gRPC-Core', :path => ROOT_DIR
11   pod 'gRPC-RxLibrary', :path => ROOT_DIR
12   pod 'RemoteTest', :path => "../RemoteTestClient"
13   pod '!ProtoCompiler-gRPCPlugin', :path => "#{ROOT_DIR}/src/objective-c"
14   pod 'BoringSSL-GRPC', :podspec => "#{ROOT_DIR}/src/objective-c"
15   pod '!ProtoCompiler', :path => "#{ROOT_DIR}/src/objective-c"
16 end
17
18 target 'watchOS-sample' do
19 platform :ios, '9.0'
20   grpc_deps
21 end
22
23 target 'watchOS-sample WatchKit Extension' do
24 platform :watchos, '4.0'
25   grpc_deps
26 end
27
28 pre_install do |installer|
29   grpc_core_spec = installer.pod_targets.find{|t| t.name.start_with?('gRPC-Core')}.root_spec
30
31   src_root = "$(PODS_TARGET_SRCROOT)"
32   grpc_core_spec.pod_target_xcconfig = {
33     'GRPC_SRC_ROOT' => src_root,
34     'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
35     'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
36     # If we don't set these two settings, `include/grpc/support/time.h` and
37     # `src/core/lib/gpr/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the
38     # build.
39     'USE_HEADERMAP' => 'NO',
40     'ALWAYS_SEARCH_USER_PATHS' => 'NO',
41   }
42 end
43