blob: 34676d24bbe0aef07444d687b29c5731d02abc95 [file] [log] [blame]
# 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("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
go_library("config") {
name = "config"
source_dir = "$root_gen_dir/go-proto-gen/src/third_party/cobalt/config"
non_go_deps = [ "//third_party/cobalt/config:cobalt_registry_proto" ]
}
_source_packages = [
"config_parser",
"config_validator",
"source_generator",
"yamlpb",
]
foreach(pkg, _source_packages) {
go_library(pkg) {
name = pkg
source_dir = pkg
}
}
# This duplicates some source paths, but main needs to be relocated into a
# package path for our go_build rules.
go_library("main") {
name = "main"
# sources = ["config_parser_main.go"]
source_dir = "."
}
go_binary("bin") {
gopackage = "main"
output_name = "config_parser"
deps = [
":config",
":main",
"//garnet/public/go/third_party:github.com/go-yaml/yaml",
"//garnet/public/go/third_party:github.com/golang/glog",
"//garnet/public/go/third_party:github.com/golang/protobuf",
]
foreach(pkg, _source_packages) {
deps += [ ":$pkg" ]
}
}