| # Copyright 2022 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/generate-dbus-adaptors.gni") |
| import("//common-mk/generate-dbus-proxies.gni") |
| import("//common-mk/mojom_bindings_generator.gni") |
| import("//common-mk/pkg_config.gni") |
| |
| group("all") { |
| deps = [ |
| ":faced", |
| ":install_dbus_conf", |
| ":install_init_conf", |
| ] |
| if (use.test) { |
| deps += [ ":faced_test_runner" ] |
| } |
| } |
| |
| install_config("install_dbus_conf") { |
| sources = [ "dbus/org.chromium.FaceAuthDaemon.conf" ] |
| install_path = "/etc/dbus-1/system.d/" |
| } |
| |
| install_config("install_init_conf") { |
| sources = [ "init/faced.conf" ] |
| install_path = "/etc/init" |
| } |
| |
| generate_mojom_bindings("face_auth_mojo_bindings") { |
| mojo_root = "${platform2_root}" |
| sources = [ "mojom/face_auth.mojom" ] |
| } |
| |
| pkg_config("target_defaults_pkg_deps") { |
| pkg_deps = [ |
| "absl", |
| "libbrillo", |
| "libchrome", |
| "libmojo", |
| ] |
| } |
| |
| generate_dbus_proxies("libfaced_dbus_proxy") { |
| proxy_output_file = "include/dbus_proxies/dbus-proxies.h" |
| sources = [ "dbus/org.chromium.FaceAuthDaemon.xml" ] |
| } |
| |
| generate_dbus_adaptors("libfaced_dbus_adaptor") { |
| dbus_service_config = "dbus/dbus-service-config.json" |
| dbus_adaptors_out_dir = "include/faced/dbus_adaptors" |
| sources = [ "dbus/org.chromium.FaceAuthDaemon.xml" ] |
| } |
| |
| source_set("libfaced") { |
| sources = [ |
| "dbus_adaptor.cc", |
| "face_auth_daemon.cc", |
| "face_auth_service.cc", |
| "face_auth_service_impl.cc", |
| "session.cc", |
| ] |
| all_dependent_configs = [ ":target_defaults_pkg_deps" ] |
| deps = [ |
| ":face_auth_mojo_bindings", |
| ":libfaced_dbus_adaptor", |
| ":libfaced_dbus_proxy", |
| ] |
| } |
| |
| executable("faced") { |
| sources = [ "main.cc" ] |
| deps = [ ":libfaced" ] |
| install_path = "/usr/sbin" |
| } |
| |
| if (use.test) { |
| pkg_config("test_pkg_deps") { |
| pkg_deps = [ |
| "libbrillo-test", |
| "libchrome-test", |
| ] |
| } |
| executable("faced_test_runner") { |
| sources = [ |
| "dbus_adaptor_test.cc", |
| "face_auth_service_impl_test.cc", |
| "testrunner.cc", |
| ] |
| configs += [ |
| "//common-mk:test", |
| ":target_defaults_pkg_deps", |
| ":test_pkg_deps", |
| ] |
| run_test = true |
| deps = [ |
| ":libfaced", |
| "//common-mk/testrunner", |
| ] |
| } |
| } |