blob: 27a3d538a82aeed48b6f808839db965ff06fe708 [file] [log] [blame]
# Copyright 2019 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 = [ ":virtual-usb-printer" ]
if (use.test) {
deps += [
":escl-manager-testrunner",
":http-util-testrunner",
":ipp-manager-testrunner",
":ipp-util-testrunner",
":jpeg-util-testrunner",
":load-config-testrunner",
":smart-buffer-testrunner",
"//virtual-usb-printer/mock_printer:unit_tests",
]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
"libjpeg",
"libxml-2.0",
]
}
executable("virtual-usb-printer") {
sources = [
"cups_constants.cc",
"device_descriptors.cc",
"escl_manager.cc",
"http_util.cc",
"ipp_manager.cc",
"ipp_util.cc",
"jpeg_util.cc",
"load_config.cc",
"op_commands.cc",
"server.cc",
"usb_printer.cc",
"usbip.cc",
"value_util.cc",
"virtual_usb_printer.cc",
"xml_util.cc",
]
configs += [ ":target_defaults" ]
deps = [
":smart_buffer",
"//virtual-usb-printer/mock_printer:implementation",
"//virtual-usb-printer/mock_printer:mocking_protos",
"//virtual-usb-printer/mock_printer:parse_textproto",
]
}
source_set("smart_buffer") {
public = [ "smart_buffer.h" ]
sources = [ "smart_buffer.cc" ]
configs += [ ":target_defaults" ]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("escl-manager-testrunner") {
sources = [
"escl_manager.cc",
"escl_manager_test.cc",
"ipp_util.cc",
"jpeg_util.cc",
"xml_util.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":smart_buffer",
"//common-mk/testrunner",
]
}
executable("http-util-testrunner") {
sources = [
"http_util.cc",
"http_util_test.cc",
"value_util.cc",
]
# TODO(oka); Remove //common-mk:test by making testrunner to public_config //common-mk:test
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":smart_buffer",
"//common-mk/testrunner",
]
}
executable("ipp-manager-testrunner") {
sources = [
"ipp_manager.cc",
"ipp_manager_test.cc",
"ipp_util.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":smart_buffer",
"//common-mk/testrunner",
]
}
executable("ipp-util-testrunner") {
sources = [
"cups_constants.cc",
"http_util.cc",
"ipp_util.cc",
"ipp_util_test.cc",
"value_util.cc",
]
# TODO(oka); Remove //common-mk:test by making testrunner to public_config //common-mk:test
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":smart_buffer",
"//common-mk/testrunner",
]
}
executable("jpeg-util-testrunner") {
sources = [
"jpeg_util.cc",
"jpeg_util_test.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [ "//common-mk/testrunner" ]
}
executable("smart-buffer-testrunner") {
sources = [
"smart_buffer_test.cc",
"value_util.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":smart_buffer",
"//common-mk/testrunner",
]
}
executable("load-config-testrunner") {
sources = [
"device_descriptors.cc",
"load_config.cc",
"load_config_test.cc",
"value_util.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [ "//common-mk/testrunner" ]
}
}