| # 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 = [ |
| ":libmems", |
| ":libmems_test_support", |
| ] |
| |
| if (use.test) { |
| deps += [ ":libmems_testrunner" ] |
| } |
| } |
| |
| pkg_config("target_defaults_pkg_deps") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| "libiio", |
| ] |
| } |
| |
| shared_library("libmems") { |
| configs += [ ":target_defaults_pkg_deps" ] |
| sources = [ |
| "iio_channel_impl.cc", |
| "iio_context_impl.cc", |
| "iio_device.cc", |
| "iio_device_impl.cc", |
| "iio_device_trigger_impl.cc", |
| ] |
| } |
| |
| shared_library("libmems_test_support") { |
| configs += [ ":target_defaults_pkg_deps" ] |
| deps = [ ":libmems" ] |
| sources = [ "test_fakes.cc" ] |
| } |
| |
| if (use.test) { |
| pkg_config("libmems_testrunner_pkg_deps") { |
| pkg_deps = [ |
| "libbrillo-test", |
| "libchrome-test", |
| "libiio", |
| ] |
| } |
| |
| executable("libmems_testrunner") { |
| configs += [ |
| "//common-mk:test", |
| ":libmems_testrunner_pkg_deps", |
| ":target_defaults_pkg_deps", |
| ] |
| |
| deps = [ |
| ":libmems", |
| ":libmems_test_support", |
| "//common-mk/testrunner", |
| ] |
| |
| pkg_deps = [ "libmems_test_support" ] |
| |
| sources = [ "iio_device_test.cc" ] |
| } |
| } |