blob: 3b9d0140de454bfa4f6bdf946ab94d14f703f54c [file] [log] [blame]
# Copyright 2019 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")
# Library with utilities common to both cros_healthd and wilco_dtc_supportd.
pkg_config("libcommon_pkg_deps") {
pkg_deps = [
"libchrome",
"libmojo",
]
}
source_set("libcommon") {
configs += [ ":libcommon_pkg_deps" ]
public_deps = [ "system:libsystem" ]
sources = [ "mojo_utils.cc" ]
}
if (use.test || use.fuzzer) {
source_set("libcommon_test_utils") {
configs += [ ":libcommon_pkg_deps" ]
deps = [
":libcommon",
"system:libsystem_test_utils",
]
sources = [
"file_test_utils.cc",
"mojo_test_utils.cc",
]
}
}
if (use.test) {
source_set("mojo_testrunner") {
configs += [
":libcommon_pkg_deps",
"//common-mk:test",
]
deps = [ "//common-mk/testrunner:testrunner" ]
sources = [ "mojo_testrunner.cc" ]
}
executable("libcommon_test") {
configs += [
":libcommon_pkg_deps",
"//common-mk:test",
]
deps = [
":libcommon",
":libcommon_test_utils",
":mojo_testrunner",
"system:libsystem_test",
]
sources = [ "mojo_utils_test.cc" ]
}
}