[Swift] Renaming protocols (#6469)
[platform/upstream/flatbuffers.git] / BUILD.bazel
1 load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2
3 licenses(["notice"])
4
5 package(
6     default_visibility = ["//visibility:public"],
7 )
8
9 exports_files([
10     "LICENSE",
11 ])
12
13 # Public flatc library to compile flatbuffer files at runtime.
14 cc_library(
15     name = "flatbuffers",
16     hdrs = ["//:public_headers"],
17     linkstatic = 1,
18     strip_include_prefix = "/include",
19     deps = ["//src:flatbuffers"],
20 )
21
22 # Public C++ headers for the Flatbuffers library.
23 filegroup(
24     name = "public_headers",
25     srcs = [
26         "include/flatbuffers/base.h",
27         "include/flatbuffers/code_generators.h",
28         "include/flatbuffers/flatbuffers.h",
29         "include/flatbuffers/flexbuffers.h",
30         "include/flatbuffers/grpc.h",
31         "include/flatbuffers/hash.h",
32         "include/flatbuffers/idl.h",
33         "include/flatbuffers/minireflect.h",
34         "include/flatbuffers/reflection.h",
35         "include/flatbuffers/reflection_generated.h",
36         "include/flatbuffers/registry.h",
37         "include/flatbuffers/stl_emulation.h",
38         "include/flatbuffers/util.h",
39     ],
40 )
41
42 # Public flatc compiler library.
43 cc_library(
44     name = "flatc_library",
45     linkstatic = 1,
46     deps = [
47         "//src:flatc_library",
48     ],
49 )
50
51 # Public flatc compiler.
52 cc_binary(
53     name = "flatc",
54     deps = [
55         "//src:flatc",
56     ],
57 )
58
59 filegroup(
60     name = "flatc_headers",
61     srcs = [
62         "include/flatbuffers/flatc.h",
63     ],
64     visibility = ["//:__subpackages__"],
65 )
66
67 # Library used by flatbuffer_cc_library rules.
68 cc_library(
69     name = "runtime_cc",
70     hdrs = [
71         "include/flatbuffers/base.h",
72         "include/flatbuffers/flatbuffers.h",
73         "include/flatbuffers/flexbuffers.h",
74         "include/flatbuffers/stl_emulation.h",
75         "include/flatbuffers/util.h",
76     ],
77     linkstatic = 1,
78     strip_include_prefix = "/include",
79 )