blob: fc40068deed455ab8584fe6bc177dde171618972 [file] [log] [blame]
# Copyright 2018 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.
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//garnet/bin/wayland/protocol.gni")
rustc_library("lib") {
edition = "2018"
name = "wayland_scanner_lib"
deps = [
"//third_party/rust-crates/rustc_deps:num",
"//third_party/rust-crates/rustc_deps:xml-rs",
]
}
if (host_toolchain == current_toolchain) {
rustc_binary("scanner") {
edition = "2018"
deps = [
":lib",
"//third_party/rust-crates/rustc_deps:structopt",
]
}
}
rustc_library("wayland_scanner_front_end_test") {
edition = "2018"
with_unit_tests = true
deps = [
":lib",
]
source_root = "tests/front_end_test.rs"
}
wayland_protocol("test_protocol") {
protocol = "tests/test_protocol.xml"
}
rustc_library("wayland_scanner_back_end_test") {
edition = "2018"
with_unit_tests = true
deps = [
":lib",
":test_protocol",
"//garnet/bin/wayland/core",
"//garnet/public/rust/fuchsia-zircon",
"//garnet/public/rust/zerocopy",
]
source_root = "tests/back_end_test.rs"
}
group("tests") {
public_deps = [
":wayland_scanner_back_end_test",
":wayland_scanner_front_end_test",
]
}