| # Copyright 2019 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 = [ ":printer_diag" ] |
| if (use.test) { |
| deps += [ ":printer_diag_test" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| "libipp", |
| ] |
| } |
| |
| executable("printer_diag") { |
| sources = [ |
| "helpers.cc", |
| "helpers.h", |
| "ipp_in_json.cc", |
| "ipp_in_json.h", |
| "printer_diag.cc", |
| ] |
| install_path = "bin" |
| configs += [ ":target_defaults" ] |
| } |
| |
| if (use.test) { |
| executable("printer_diag_test") { |
| sources = [ |
| "helpers.cc", |
| "helpers.h", |
| "helpers_test.cc", |
| "ipp_in_json.cc", |
| "ipp_in_json.h", |
| "ipp_in_json_test.cc", |
| ] |
| configs += [ |
| ":target_defaults", |
| "//common-mk:test", |
| ] |
| run_test = true |
| deps = [ "//common-mk/testrunner" ] |
| } |
| } |