blob: a11ca407b63094df4591eb35aad459068f4d3eca [file] [log] [blame]
# 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 = [ ":syslog-cat" ]
if (use.test) {
deps += [ ":syslogcat_testrunner" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
]
}
static_library("syslogcat_lib") {
configs += [ ":target_defaults" ]
sources = [
"syslogcat.cc",
"syslogcat.h",
]
}
executable("syslog-cat") {
configs += [ ":target_defaults" ]
sources = [ "main.cc" ]
install_path = "sbin"
deps = [ ":syslogcat_lib" ]
}
if (use.test) {
pkg_config("syslogcat_testrunner_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("syslogcat_testrunner") {
configs += [
"//common-mk:test",
":syslogcat_testrunner_config",
":target_defaults",
]
run_test = true
defines = [ "UNIT_TEST" ]
sources = [ "syslogcat_test.cc" ]
deps = [
":syslogcat_lib",
"//common-mk/testrunner",
]
}
}