blob: c2b27005bed8920a48980df2dfcee7d32431745c [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/generate-dbus-adaptors.gni")
import("//common-mk/pkg_config.gni")
group("all") {
deps = [
":image-burner-adaptors",
":image_burner",
":libimage-burner",
]
if (use.test) {
deps += [ ":unittest_runner" ]
}
}
pkg_config("target_defaults") {
libs = [ "rootdev" ]
pkg_deps = [
"libbrillo",
"libchrome",
]
}
generate_dbus_adaptors("image-burner-adaptors") {
dbus_service_config = "dbus_bindings/dbus-service-config.json"
dbus_adaptors_out_dir = "include/image-burner/dbus_adaptors"
sources = [ "dbus_bindings/org.chromium.ImageBurnerInterface.xml" ]
}
static_library("libimage-burner") {
configs += [ ":target_defaults" ]
sources = [
"daemon.cc",
"image_burn_service.cc",
"image_burner_impl.cc",
"image_burner_utils.cc",
]
deps = [ ":image-burner-adaptors" ]
}
executable("image_burner") {
configs += [ ":target_defaults" ]
sources = [ "image_burner_main.cc" ]
deps = [ ":libimage-burner" ]
}
if (use.test) {
executable("unittest_runner") {
configs += [
"//common-mk:test",
":target_defaults",
]
sources = [
"image_burner_impl_test.cc",
"image_burner_utils_test.cc",
]
deps = [
":libimage-burner",
"//common-mk/testrunner",
]
}
}