| # 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 = [ ":libpasswordprovider" ] |
| if (use.test) { |
| deps += [ ":password_provider_test" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ "libchrome" ] |
| } |
| |
| shared_library("libpasswordprovider") { |
| sources = [ |
| "password.cc", |
| "password.h", |
| "password_provider.cc", |
| "password_provider.h", |
| ] |
| configs += [ ":target_defaults" ] |
| libs = [ "keyutils" ] |
| } |
| |
| if (use.test) { |
| executable("password_provider_test") { |
| sources = [ |
| "password.cc", |
| "password_provider.cc", |
| "password_provider_test.cc", |
| "password_test.cc", |
| ] |
| configs += [ |
| # //common-mk:test should be at the top. crbug.com/887845 |
| # TODO(crbug.com/887845): Remove this note after library order issue is resolved. |
| "//common-mk:test", |
| ":target_defaults", |
| ] |
| libs = [ "keyutils" ] |
| deps = [ |
| ":libpasswordprovider", |
| "//common-mk/testrunner", |
| ] |
| } |
| } |