From 44dc423f99330cc2266b5c18c6e89becf7c88684 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 19 Jun 2015 16:30:31 -0700 Subject: [PATCH] Add BUILD target for Objective-C's RxLibrary Part of https://github.com/grpc/grpc/issues/2120 Depends on https://github.com/grpc/grpc/pull/2193 --- BUILD | 27 +++++++++++++++++++++++++++ templates/BUILD.template | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/BUILD b/BUILD index d7f0e5a5881..ff07cd11326 100644 --- a/BUILD +++ b/BUILD @@ -853,3 +853,30 @@ cc_binary( + +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", + ], +) + +objc_library( + name = "rx_library_private", + hdrs = glob([rx_library_path + "/private/*.h"]), + srcs = glob([rx_library_path + "/private/*.m"]), + visibility = ["//visibility:private"], +) diff --git a/templates/BUILD.template b/templates/BUILD.template index ec5fb3584f0..63e9f9ebeb6 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -112,3 +112,30 @@ cc_binary( ], ) + +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", + ], +) + +objc_library( + name = "rx_library_private", + hdrs = glob([rx_library_path + "/private/*.h"]), + srcs = glob([rx_library_path + "/private/*.m"]), + visibility = ["//visibility:private"], +)