blob: 380abedc584c8798e8d1f3949f99203f84931edc [file] [log] [blame]
# Copyright 2018 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 = [
":easy_unlock",
":install_conf",
":install_init_conf",
":install_interfaces",
":install_service",
":libeasyunlock",
]
if (use.test) {
deps += [ ":easy_unlock_test_runner" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"easy-unlock-crypto",
"libbrillo",
"libchrome",
]
}
static_library("libeasyunlock") {
sources = [
"dbus_adaptor.cc",
"dbus_adaptor.h",
"easy_unlock_service.cc",
"easy_unlock_service.h",
]
if (use.test) {
sources += [
"fake_easy_unlock_service.cc",
"fake_easy_unlock_service.h",
]
}
configs += [ ":target_defaults" ]
}
executable("easy_unlock") {
sources = [ "main.cc" ]
configs += [ ":target_defaults" ]
install_path = "/opt/google/easy_unlock"
deps = [ ":libeasyunlock" ]
}
install_config("install_conf") {
sources = [ "org.chromium.EasyUnlock.conf" ]
install_path = "/etc/dbus-1/system.d"
}
install_config("install_service") {
sources = [ "org.chromium.EasyUnlock.service" ]
install_path = "/usr/share/dbus-1/system-services"
}
install_config("install_init_conf") {
sources = [ "init/easy-unlock.conf" ]
install_path = "/etc/init"
}
install_config("install_interfaces") {
sources = [ "dbus_bindings/org.chromium.EasyUnlockInterface.xml" ]
install_path = "/usr/share/dbus-1/interfaces"
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("easy_unlock_test_runner") {
sources = [ "easy_unlock_test.cc" ]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
run_test = true
deps = [
":libeasyunlock",
"//common-mk/testrunner",
]
}
}