| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//third_party/flatbuffers/flatbuffer.gni") |
| |
| config("flatbuffers_fuchsia_warnings") { |
| cflags = [] |
| } |
| |
| config("flatbuffers_config") { |
| include_dirs = [ "include" ] |
| } |
| |
| source_set("flatbuffers") { |
| sources = [ |
| "include/flatbuffers/flatbuffers.h", |
| "include/flatbuffers/hash.h", |
| ] |
| |
| configs += [ ":flatbuffers_fuchsia_warnings" ] |
| public_configs = [ ":flatbuffers_config" ] |
| } |
| |
| source_set("compiler_files") { |
| sources = [ |
| "grpc/src/compiler/cpp_generator.cc", |
| "grpc/src/compiler/cpp_generator.h", |
| "grpc/src/compiler/go_generator.cc", |
| "grpc/src/compiler/go_generator.h", |
| "grpc/src/compiler/schema_interface.h", |
| "include/flatbuffers/code_generators.h", |
| "include/flatbuffers/idl.h", |
| "include/flatbuffers/util.h", |
| "src/idl_gen_cpp.cpp", |
| "src/idl_gen_fbs.cpp", |
| "src/idl_gen_general.cpp", |
| "src/idl_gen_go.cpp", |
| "src/idl_gen_grpc.cpp", |
| "src/idl_gen_js.cpp", |
| "src/idl_gen_php.cpp", |
| "src/idl_gen_python.cpp", |
| "src/idl_gen_text.cpp", |
| "src/idl_parser.cpp", |
| "src/reflection.cpp", |
| "src/util.cpp", |
| ] |
| include_dirs = [ "grpc" ] |
| visibility = [ ":*" ] |
| deps = [ |
| ":flatbuffers", |
| ] |
| } |
| |
| executable("flatc") { |
| sources = [ |
| "src/flatc.cpp", |
| ] |
| deps = [ |
| ":compiler_files", |
| ":flatbuffers", |
| ] |
| |
| if (is_linux) { |
| libs = [ "pthread" ] |
| } |
| } |