blob: 94b81f96fc0b4a6758d44e5aa5c581265be710a1 [file] [log] [blame]
# Copyright 2018 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 = [ ":libthd" ]
if (use.test) {
deps += [ ":thd_unittests" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
]
}
static_library("libthd") {
sources = [
"mechanism/fake_mechanism.cc",
"mechanism/file_write_mechanism.cc",
"mechanism/mechanism.cc",
"source/ectool_temps_source.cc",
"source/fake_source.cc",
"source/file_source.cc",
]
configs += [ ":target_defaults" ]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("thd_unittests") {
sources = [
"mechanism/file_write_mechanism_test.cc",
"source/file_source_test.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":libthd",
"//common-mk/testrunner",
]
}
}