blob: 606ae7cbf1cafe474fb34a330d586fd048114203 [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")
group("all") {
deps = [ ":mems_setup" ]
if (use.test) {
deps += [ ":mems_setup_testrunner" ]
}
}
pkg_config("target_defaults_pkg_deps") {
defines = [ "USE_IIOSERVICE=${use.iioservice}" ]
pkg_deps = [
"libbrillo",
"libchrome",
]
}
config("target_defaults") {
configs = [ ":target_defaults_pkg_deps" ]
}
static_library("libmems_setup") {
configs += [ ":target_defaults" ]
sources = [
"configuration.cc",
"delegate_impl.cc",
"sensor_kind.cc",
]
public_pkg_deps = [ "libmems" ]
}
executable("mems_setup") {
configs += [ ":target_defaults" ]
sources = [ "main.cc" ]
deps = [ ":libmems_setup" ]
}
if (use.test) {
pkg_config("mems_setup_testrunner_pkg_deps") {
pkg_deps = [
"libbrillo-test",
"libchrome-test",
]
}
executable("mems_setup_testrunner") {
configs += [
"//common-mk:test",
":mems_setup_testrunner_pkg_deps",
":target_defaults",
]
deps = [
":libmems_setup",
"//common-mk/testrunner",
]
pkg_deps = [ "libmems_test_support" ]
sources = [
"accelerometer_test.cc",
"gyroscope_test.cc",
"light_test.cc",
"test_fakes.cc",
"test_helper.cc",
"vpd_loader_test.cc",
]
}
}