| # Copyright 2020 The Chromium OS 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("//common-mk/pkg_config.gni") |
| |
| group("all") { |
| deps = [ |
| ":croslog", |
| ] |
| if (use.test) { |
| deps += [ ":run_tests" ] |
| } |
| } |
| |
| static_library("libcroslog_static") { |
| sources = [ |
| "config.cc", |
| "config.h", |
| ] |
| configs += [ ":target_defaults" ] |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ "libchrome-${libbase_ver}" ] |
| } |
| |
| executable("croslog") { |
| configs += [ ":target_defaults" ] |
| |
| sources = [ |
| "main.cc", |
| ] |
| deps = [ |
| ":libcroslog_static", |
| ] |
| } |
| |
| if (use.test) { |
| executable("run_tests") { |
| sources = [ |
| "config_test.cc", |
| ] |
| configs += [ |
| "//common-mk:test", |
| ":target_defaults", |
| ] |
| deps = [ |
| ":libcroslog_static", |
| "//common-mk/testrunner:testrunner", |
| ] |
| } |
| } |