blob: 76add9a41451b8e19bab230ce8713cdb2df42731 [file] [log] [blame]
# 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/mojom_bindings_generator.gni")
import("//common-mk/pkg_config.gni")
group("all") {
deps = [ ":cups_proxy" ]
if (use.test) {
deps += [ ":cups_proxy_unittest" ]
}
}
generate_mojom_bindings("cups_proxy_mojo_bindings") {
mojo_root = "${platform2_root}"
sources = [ "mojom/proxy.mojom" ]
}
pkg_config("cups_proxy_common_pkg_deps") {
pkg_deps = [
"libbrillo",
"libchrome",
"libmicrohttpd",
"libmojo",
]
}
static_library("cups_proxy_common") {
sources = [
"daemon.cc",
"mhd_http_request.cc",
"mhd_util.cc",
"mojo_handler.cc",
]
all_dependent_configs = [ ":cups_proxy_common_pkg_deps" ]
deps = [ ":cups_proxy_mojo_bindings" ]
}
executable("cups_proxy") {
sources = [ "main.cc" ]
deps = [ ":cups_proxy_common" ]
}
if (use.test) {
executable("cups_proxy_unittest") {
sources = [ "mhd_http_request_test.cc" ]
configs += [ "//common-mk:test" ]
deps = [
":cups_proxy_common",
"//common-mk/testrunner:testrunner",
]
}
}