| # 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/pkg_config.gni") |
| |
| group("all") { |
| deps = [ ":chargesplash" ] |
| if (use.test) { |
| deps += [ ":chargesplash_testrunner" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| "libec", |
| ] |
| } |
| |
| static_library("libchargesplash") { |
| sources = [ |
| "frecon.cc", |
| "test_util.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| } |
| |
| executable("chargesplash") { |
| sources = [ "main.cc" ] |
| configs += [ ":target_defaults" ] |
| deps = [ ":libchargesplash" ] |
| } |
| |
| if (use.test) { |
| pkg_config("libchrome_test_config") { |
| pkg_deps = [ "libchrome-test" ] |
| } |
| executable("chargesplash_testrunner") { |
| sources = [ "frecon_test.cc" ] |
| run_test = true |
| configs += [ |
| "//common-mk:test", |
| ":libchrome_test_config", |
| ":target_defaults", |
| ] |
| deps = [ |
| ":libchargesplash", |
| "//common-mk/testrunner", |
| ] |
| } |
| } |