| # Copyright 2020 The ChromiumOS Authors | |
| # 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 = [ | |
| ":install_headers", | |
| ":libbiod_proxy", | |
| ] | |
| if (use.test) { | |
| deps += [ ":biod_proxy_test_runner" ] | |
| } | |
| } | |
| pkg_config("target_defaults") { | |
| # NOSORT | |
| pkg_deps = [ | |
| "libchrome", | |
| # system_api depends on protobuf (or protobuf-lite). It must appear | |
| # before protobuf here or the linker flags won't be in the right | |
| # order. | |
| "system_api", | |
| ] | |
| if (use.fuzzer) { | |
| pkg_deps += [ "protobuf" ] | |
| } else { | |
| pkg_deps += [ "protobuf-lite" ] | |
| } | |
| } | |
| # A shared library for clients | |
| shared_library("libbiod_proxy") { | |
| sources = [ | |
| "auth_stack_manager_proxy_base.cc", | |
| "biometrics_manager_proxy_base.cc", | |
| "util.cc", | |
| ] | |
| configs += [ ":target_defaults" ] | |
| install_path = "lib" | |
| } | |
| install_config("install_headers") { | |
| sources = [ | |
| "auth_stack_manager_proxy_base.h", | |
| "biometrics_manager_proxy_base.h", | |
| "mock_auth_stack_manager_proxy_base.h", | |
| "mock_biometrics_manager_proxy_base.h", | |
| "util.h", | |
| ] | |
| install_path = "/usr/include/biod/biod_proxy/" | |
| } | |
| if (use.test) { | |
| pkg_config("libchrome_test_config") { | |
| pkg_deps = [ "libchrome-test" ] | |
| } | |
| executable("biod_proxy_test_runner") { | |
| sources = [ | |
| "auth_stack_manager_proxy_base_test.cc", | |
| "biometrics_manager_proxy_base_test.cc", | |
| ] | |
| configs += [ | |
| "//common-mk:test", | |
| ":libchrome_test_config", | |
| ":target_defaults", | |
| ] | |
| run_test = true | |
| deps = [ | |
| ":libbiod_proxy", | |
| "//common-mk/testrunner", | |
| ] | |
| } | |
| } |