diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/BUILD.template | 65 | ||||
-rw-r--r-- | templates/gRPC.podspec.template | 2 |
2 files changed, 48 insertions, 19 deletions
diff --git a/templates/BUILD.template b/templates/BUILD.template index 98ad08a01c..4d2bf7db28 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -64,7 +64,7 @@ ${cc_library(lib)} % endfor % for lib in libs: -% if lib.name in ("grpc_unsecure", "gpr"): +% if lib.name in ("grpc", "gpr"): ${objc_library(lib)} % endif % endfor @@ -127,6 +127,9 @@ objc_library( % for dep in lib.get("deps", []): ":${dep}_objc", % endfor +% if lib.get('secure', 'no') == 'yes': + "//external:libssl_objc", +% endif ], % if lib.get("baselib", false): sdk_dylibs = ["libz"], @@ -155,24 +158,50 @@ objc_path = "src/objective-c" rx_library_path = objc_path + "/RxLibrary" objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], + name = "rx_library", + hdrs = glob([ + rx_library_path + "/*.h", + rx_library_path + "/transformations/*.h", + ]), + srcs = glob([ + rx_library_path + "/*.m", + rx_library_path + "/transformations/*.m", + ]), + includes = [objc_path], + deps = [ + ":rx_library_private", + ], +) + +objc_library( + name = "rx_library_private", + hdrs = glob([rx_library_path + "/private/*.h"]), + srcs = glob([rx_library_path + "/private/*.m"]), + visibility = ["//visibility:private"], ) +objc_client_path = objc_path + "/GRPCClient" + objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], + name = "grpc_client", + hdrs = glob([ + objc_client_path + "/*.h", + objc_client_path + "/private/*.h", + ]), + srcs = glob([ + objc_client_path + "/*.m", + objc_client_path + "/private/*.m", + ]), + includes = [objc_path], + bundles = [":gRPCCertificates"], + deps = [ + ":grpc_objc", + ":rx_library", + ], +) + +objc_bundle_library( + # The choice of name is signicant here, since it determines the bundle name. + name = "gRPCCertificates", + resources = ["etc/roots.pem"], ) diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 02e90d7180..deea07cee3 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -137,7 +137,7 @@ Pod::Spec.new do |s| ss.dependency 'gRPC/RxLibrary' # Certificates, to be able to establish TLS connections: - ss.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } + ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } end # RPC library for ProtocolBuffers, based on gRPC |