| # 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. |
| |
| import("//build/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| group("all") { |
| deps = [ |
| ":graphical_session", |
| "//src/ui/scenic:scenic_pkg", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":graphical_session", |
| ":graphical_session_tests", |
| ] |
| } |
| |
| rustc_binary("graphical_session_bin") { |
| name = "graphical_session" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.images:fuchsia.images-rustc", |
| "//sdk/fidl/fuchsia.ui.gfx:fuchsia.ui.gfx-rustc", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/ui/fuchsia-scenic", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:png", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/app.rs", |
| "src/graphics_util.rs", |
| "src/main.rs", |
| "src/view.rs", |
| ] |
| } |
| |
| package("graphical_session") { |
| deps = [ ":graphical_session_bin" ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/graphical_session.cml") |
| dest = "graphical_session.cm" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("resources/whale.png") |
| dest = "whale.png" |
| }, |
| ] |
| |
| binaries = [ |
| { |
| name = "graphical_session" |
| }, |
| ] |
| } |
| |
| package("graphical_session_tests") { |
| testonly = true |
| deps = [ |
| ":graphical_session_bin", |
| ":graphical_session_bin_test", |
| ] |
| |
| meta = [ |
| { |
| path = "meta/graphical_session_bin_test.cml" |
| dest = "graphical_session_bin_test.cm" |
| }, |
| ] |
| |
| binaries = [ |
| { |
| name = "graphical_session" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "graphical_session_bin_test" |
| }, |
| ] |
| } |