blob: 57f2b8ea00cfbdc43944eef13837a2d2f57553b8 [file] [log] [blame]
Austin Schuh4ac96a82019-08-14 20:24:23 -07001package(
2 default_visibility = ["//visibility:public"],
Austin Schuh4ac96a82019-08-14 20:24:23 -07003)
4
Philipp Schraderdada1072020-11-24 11:34:46 -08005licenses(["notice"])
6
Austin Schuh4ac96a82019-08-14 20:24:23 -07007exports_files([
8 "LICENSE",
Philipp Schradere625ba22020-11-16 20:11:37 -08009 "tsconfig.json",
Austin Schuh4ac96a82019-08-14 20:24:23 -070010])
11
Austin Schuh4ac96a82019-08-14 20:24:23 -070012# Public flatc library to compile flatbuffer files at runtime.
13cc_library(
14 name = "flatbuffers",
Austin Schuh7c75e582020-11-14 16:41:18 -080015 hdrs = ["//:public_headers"],
Philipp Schradere625ba22020-11-16 20:11:37 -080016 copts = ["-Wno-cast-align"],
Austin Schuh4ac96a82019-08-14 20:24:23 -070017 linkstatic = 1,
Austin Schuh7c75e582020-11-14 16:41:18 -080018 strip_include_prefix = "/include",
19 deps = ["//src:flatbuffers"],
Austin Schuh4ac96a82019-08-14 20:24:23 -070020)
21
22# Public C++ headers for the Flatbuffers library.
23filegroup(
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",
Austin Schuh7c75e582020-11-14 16:41:18 -080030 "include/flatbuffers/grpc.h",
Austin Schuh4ac96a82019-08-14 20:24:23 -070031 "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",
Austin Schuh7c75e582020-11-14 16:41:18 -080036 "include/flatbuffers/registry.h",
Austin Schuh4ac96a82019-08-14 20:24:23 -070037 "include/flatbuffers/stl_emulation.h",
38 "include/flatbuffers/util.h",
39 ],
40)
41
42# Public flatc compiler library.
43cc_library(
44 name = "flatc_library",
Austin Schuh7c75e582020-11-14 16:41:18 -080045 linkstatic = 1,
46 deps = [
47 "//src:flatc_library",
Austin Schuh4ac96a82019-08-14 20:24:23 -070048 ],
49)
50
51# Public flatc compiler.
52cc_binary(
53 name = "flatc",
Alex Perrycb7da4b2019-08-28 19:35:56 -070054 data = [
55 "reflection/reflection.fbs",
56 ],
Austin Schuh4ac96a82019-08-14 20:24:23 -070057 deps = [
Austin Schuh7c75e582020-11-14 16:41:18 -080058 "//src:flatc",
Austin Schuh4ac96a82019-08-14 20:24:23 -070059 ],
60)
61
Austin Schuh7c75e582020-11-14 16:41:18 -080062filegroup(
63 name = "flatc_headers",
64 srcs = [
65 "include/flatbuffers/flatc.h",
66 ],
67 visibility = ["//:__subpackages__"],
68)
69
70# Library used by flatbuffer_cc_library rules.
Austin Schuh4ac96a82019-08-14 20:24:23 -070071cc_library(
72 name = "runtime_cc",
73 hdrs = [
74 "include/flatbuffers/base.h",
75 "include/flatbuffers/flatbuffers.h",
76 "include/flatbuffers/flexbuffers.h",
77 "include/flatbuffers/stl_emulation.h",
78 "include/flatbuffers/util.h",
79 ],
Austin Schuh4ac96a82019-08-14 20:24:23 -070080 linkstatic = 1,
Austin Schuh7c75e582020-11-14 16:41:18 -080081 strip_include_prefix = "/include",
Austin Schuh4ac96a82019-08-14 20:24:23 -070082)
Philipp Schradere625ba22020-11-16 20:11:37 -080083
James Kuszmaulf385c462019-12-24 09:37:34 -080084py_library(
85 name = "flatpy",
86 srcs = glob(["python/flatbuffers/*.py"]),
87 imports = ["python/"],
88)
Alex Perryb3b50792020-01-18 16:13:45 -080089
90filegroup(
91 name = "flatjs",
92 srcs = ["js/flatbuffers.js"],
93)