| # Copyright 2019 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/components.gni") |
| import("//build/host.gni") |
| import("//build/test.gni") |
| |
| source_set("src") { |
| sources = [ |
| "addr.cc", |
| "addr.h", |
| "api_abstraction.h", |
| "log.h", |
| "sockscripter.cc", |
| "sockscripter.h", |
| "util.cc", |
| "util.h", |
| ] |
| |
| public_deps = [ "//src/lib/fxl" ] |
| } |
| |
| executable("bin") { |
| output_name = "sockscripter" |
| sources = [ "main.cc" ] |
| |
| deps = [ ":src" ] |
| } |
| |
| test("sockscripter_test") { |
| testonly = true |
| sources = [ |
| "addr_test.cc", |
| "sockscripter_test.cc", |
| ] |
| deps = [ |
| ":src", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| install_host_tools("host") { |
| deps = [ ":bin" ] |
| outputs = [ "sockscripter" ] |
| } |
| |
| group("sockscripter") { |
| deps = [ |
| ":host", |
| ":package", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":sockscripter", |
| ":sockscripter-unittest", |
| ":sockscripter_test($host_toolchain)", |
| ] |
| } |
| |
| fuchsia_unittest_package("sockscripter-unittest") { |
| deps = [ ":sockscripter_test" ] |
| } |
| |
| fuchsia_shell_package("package") { |
| package_name = "sockscripter" |
| deps = [ ":bin" ] |
| } |