blob: 75e479f46806a9ac44f2482d4b0b31f69ca96ec3 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
##########################################
# Though under //zircon, this build file #
# is meant to be used in the Fuchsia GN #
# build. #
# See fxb/36139. #
##########################################
assert(!defined(zx) || zx != "/",
"This file can only be used in the Fuchsia GN build.")
import("//build/test.gni")
import("//build/unification/images/migrated_manifest.gni")
group("audio") {
testonly = true
deps = [
":bin",
":src",
":test",
]
}
source_set("src") {
visibility = [ ":*" ]
sources = [
"generated-source.cc",
"generated-source.h",
"noise-source.h",
"sine-source.h",
"wav-common.cc",
"wav-common.h",
"wav-sink.cc",
"wav-sink.h",
"wav-source.cc",
"wav-source.h",
]
public_deps = [
"//zircon/public/lib/fbl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/audio-proto-utils",
"//zircon/system/ulib/audio-utils",
]
deps = [ "//zircon/public/lib/fdio" ]
}
executable("bin") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "audio"
output_dir = "$root_out_dir/zircon-migrated"
sources = [ "audio.cc" ]
deps = [ ":src" ]
}
test("test") {
# Dependent manifests unfortunately cannot be marked as `testonly`.
# TODO(44278): Remove when converting this file to proper GN build idioms.
testonly = false
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "audio-test"
sources = [
"noise-source-test.cc",
"sine-source-test.cc",
]
include_dirs = [ "." ]
deps = [
":src",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fdio",
"//zircon/public/lib/fzl",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
]
}
migrated_manifest("bin-manifest") {
deps = [ ":bin" ]
}
migrated_manifest("test-manifest") {
deps = [ ":test" ]
}