blob: 1e7c8fc2fa85ebc48cf1d976b678e19daf14106a [file] [log] [blame]
# Copyright 2023 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 = [ ":pwgtocanonij" ]
if (use.test) {
deps += [ ":pwgtocanonij_unittest" ]
}
}
static_library("libcanonij") {
sources = [ "canon_filter.cc" ]
configs += [ ":target_defaults" ]
}
executable("pwgtocanonij") {
sources = [ "main.cc" ]
configs += [ ":target_defaults" ]
deps = [ ":libcanonij" ]
}
pkg_config("target_defaults_deps") {
pkg_deps = [
"cups",
"libbrillo",
"libchrome",
]
}
config("target_defaults") {
configs = [ ":target_defaults_deps" ]
}
if (use.test) {
executable("pwgtocanonij_unittest") {
sources = [ "canon_filter_test.cc" ]
run_test = true
configs += [
"//common-mk:test",
":target_defaults",
]
deps = [
":libcanonij",
"//common-mk/testrunner:testrunner",
]
}
}