| # Copyright 2021 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") |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| "libdebugd-client", |
| ] |
| defines = [ "USE_FACTORY_RUNTIME_PROBE=${use.factory_runtime_probe}" ] |
| } |
| |
| source_set("system") { |
| sources = [ |
| "context.cc", |
| "context_impl.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| if (use.factory_runtime_probe) { |
| sources += [ |
| "context_factory_impl.cc", |
| "helper_invoker_direct_impl.cc", |
| ] |
| } else { |
| sources += [ |
| "context_runtime_impl.cc", |
| "helper_invoker_debugd_impl.cc", |
| ] |
| } |
| } |
| |
| if (use.test) { |
| pkg_config("test_pkg_deps") { |
| pkg_deps = [ "libdebugd-client-test" ] |
| } |
| |
| source_set("test_utils") { |
| sources = [ |
| "context_mock_impl.cc", |
| "fake_helper_invoker.cc", |
| ] |
| public_configs = [ |
| ":target_defaults", |
| ":test_pkg_deps", |
| ] |
| } |
| } |