blob: da8e0be0f8d6c2570f72118d8a70afa40f189a39 [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_config_proto" ]
}
_source_packages = ["config_parser", "config_validator", "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 = [
"//garnet/public/go/third_party:github.com/golang/glog",
"//garnet/public/go/third_party:github.com/golang/protobuf",
"//garnet/public/go/third_party:github.com/go-yaml/yaml",
":config",
":main",
]
foreach(pkg, _source_packages) {
deps += [ ":$pkg" ]
}
}