| # Copyright 2018 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 = [ ":cros_config" ] |
| if (use.test) { |
| deps += [ |
| ":cros_config_functional_test", |
| ":fake_cros_config_test", |
| ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo", |
| "libchrome", |
| ] |
| } |
| |
| shared_library("libcros_config") { |
| sources = [ |
| "libcros_config/cros_config.cc", |
| "libcros_config/cros_config_impl.cc", |
| "libcros_config/fake_cros_config.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| } |
| |
| executable("cros_config") { |
| sources = [ "cros_config_main.cc" ] |
| configs += [ ":target_defaults" ] |
| deps = [ ":libcros_config" ] |
| } |
| |
| if (use.test) { |
| executable("fake_cros_config_test") { |
| sources = [ "libcros_config/fake_cros_config_test.cc" ] |
| configs += [ |
| "//common-mk:test", |
| ":target_defaults", |
| ] |
| include_dirs = [ "libcros_config" ] |
| deps = [ ":libcros_config" ] |
| } |
| |
| executable("cros_config_functional_test") { |
| sources = [ "libcros_config/cros_config_functional_test.cc" ] |
| include_dirs = [ "libcros_config" ] |
| configs += [ |
| "//common-mk:test", |
| ":target_defaults", |
| ] |
| deps = [ ":libcros_config" ] |
| } |
| } |