|  | # Copyright 2024 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. | 
|  |  | 
|  | load( | 
|  | "@rules_fuchsia//fuchsia:defs.bzl", | 
|  | "fuchsia_cc_binary", | 
|  | "fuchsia_component", | 
|  | "fuchsia_component_manifest", | 
|  | "fuchsia_package", | 
|  | ) | 
|  | load("@rules_fuchsia//fuchsia/constraints/platforms:supported_platforms.bzl", "fuchsia_platforms") | 
|  |  | 
|  | fuchsia_cc_binary( | 
|  | name = "reference_session_binary", | 
|  | srcs = [ | 
|  | "graphical_window.cc", | 
|  | "graphical_window.h", | 
|  | "hello_fuchsia.cc", | 
|  | "hello_fuchsia.h", | 
|  | "main.cc", | 
|  | ], | 
|  | deps = [ | 
|  | "@fuchsia_sdk//fidl/fuchsia.element:fuchsia.element_cpp", | 
|  | "@fuchsia_sdk//fidl/fuchsia.ui.composition:fuchsia.ui.composition_cpp", | 
|  | "@fuchsia_sdk//fidl/fuchsia.ui.views:fuchsia.ui.views_cpp", | 
|  | "@fuchsia_sdk//pkg/async-loop-cpp", | 
|  | "@fuchsia_sdk//pkg/async-loop-default", | 
|  | "@fuchsia_sdk//pkg/component_incoming_cpp", | 
|  | "@fuchsia_sdk//pkg/fdio", | 
|  | "@fuchsia_sdk//pkg/fidl_cpp", | 
|  | "@fuchsia_sdk//pkg/fidl_cpp_v2", | 
|  | "@fuchsia_sdk//pkg/fidl_cpp_wire", | 
|  | "@fuchsia_sdk//pkg/scenic_cpp", | 
|  | "@fuchsia_sdk//pkg/sys_cpp", | 
|  | "@fuchsia_sdk//pkg/syslog", | 
|  | ], | 
|  | ) | 
|  |  | 
|  | fuchsia_component_manifest( | 
|  | name = "manifest", | 
|  | src = "meta/reference_session.cml", | 
|  | includes = [ | 
|  | "@fuchsia_sdk//pkg/syslog:client", | 
|  | ], | 
|  | ) | 
|  |  | 
|  | fuchsia_component( | 
|  | name = "reference_session", | 
|  | manifest = ":manifest", | 
|  | deps = [":reference_session_binary"], | 
|  | ) | 
|  |  | 
|  | # TODO(b/349167727): Work on transitions to specify architecture in | 
|  | # fuchsia_product to avoid forking packages | 
|  |  | 
|  | fuchsia_package( | 
|  | name = "reference_session_pkg_arm64", | 
|  | package_name = "reference_session", | 
|  | components = [ | 
|  | ":reference_session", | 
|  | ], | 
|  | platform = fuchsia_platforms.arm64, | 
|  | visibility = ["//visibility:public"], | 
|  | ) | 
|  |  | 
|  | fuchsia_package( | 
|  | name = "reference_session_pkg_x64", | 
|  | package_name = "reference_session", | 
|  | components = [ | 
|  | ":reference_session", | 
|  | ], | 
|  | platform = fuchsia_platforms.x64, | 
|  | visibility = ["//visibility:public"], | 
|  | ) |