blob: 250b3435a7b575444f5be2765a40db9293d64c88 [file] [log] [blame]
# Copyright 2016 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/test/test_package.gni")
import("//build/testing/environments.gni")
import("//third_party/vulkan_loader_and_validation_layers/layers/layers.gni")
declare_args() {
# Include the vulkan validation layers in scenic.
scenic_enable_vulkan_validation = is_debug
}
package("scenic_tests") {
testonly = true
deps = [
"input/tests",
"input_reader/tests",
"presentation_mode/tests",
"view_manager/tests",
"//garnet/lib/ui/gfx/tests",
"//garnet/lib/ui/input/tests",
"//garnet/lib/ui/scenic/tests",
"//garnet/public/lib/ui/geometry/cpp:tests",
]
tests = [
{
name = "gfx_apptests"
},
{
name = "gfx_pixeltests"
environments = [ nuc_env ]
},
{
name = "gfx_viewstate_apptests"
environments = [ nuc_env ]
},
{
name = "gfx_unittests"
},
{
name = "geometry_util_unittests"
},
{
name = "input_apptests"
},
{
name = "input_unittests"
},
{
name = "input_tool_unittests"
},
{
name = "presentation_mode_unittests"
},
{
name = "scenic_unittests"
},
{
name = "view_manager_apptests"
},
]
meta = [
{
path = rebase_path("meta/scenic_tests.cmx")
dest = "scenic_tests.cmx"
},
{
path = rebase_path("meta/gfx_apptests.cmx")
dest = "gfx_apptests.cmx"
},
{
path = rebase_path("meta/gfx_pixeltests.cmx")
dest = "gfx_pixeltests.cmx"
},
{
path = rebase_path("meta/gfx_viewstate_apptests.cmx")
dest = "gfx_viewstate_apptests.cmx"
},
{
path = rebase_path("meta/gfx_unittests.cmx")
dest = "gfx_unittests.cmx"
},
{
path = rebase_path("meta/input_unittests.cmx")
dest = "input_unittests.cmx"
},
{
path = rebase_path("meta/scenic_unittests.cmx")
dest = "scenic_unittests.cmx"
},
{
path = rebase_path("meta/view_manager_apptests.cmx")
dest = "view_manager_apptests.cmx"
},
]
public_deps = vulkan_validation_layers.public_deps
loadable_modules = vulkan_validation_layers.loadable_modules
resources = vulkan_validation_layers.resources
}
package("root_presenter") {
deps = [
"root_presenter",
]
binaries = [
{
name = "root_presenter"
},
]
resources = [
{
path = rebase_path("root_presenter/resources/cursor32.png")
dest = "cursor32.png"
},
]
meta = [
{
path = rebase_path("root_presenter/meta/root_presenter.cmx")
dest = "root_presenter.cmx"
},
]
}
package("ime_service") {
deps = [
"ime",
]
binaries = [
{
name = "ime_service"
},
]
meta = [
{
path = rebase_path("ime/meta/ime_service.cmx")
dest = "ime_service.cmx"
},
]
}
test_package("ime_service_tests") {
deps = [
"ime",
]
tests = [
{
name = "ime_service_bin_test"
dest = "ime_service_unittests"
environments = basic_envs
},
]
}
package("view_manager") {
deps = [
"view_manager",
]
binaries = [
{
name = "view_manager"
},
]
meta = [
{
path = rebase_path("view_manager/meta/view_manager.cmx")
dest = "view_manager.cmx"
},
]
}
package("scenic") {
deps = [
"scenic",
]
binaries = [
{
name = "scenic"
},
]
meta = [
{
path = rebase_path("scenic/meta/scenic.cmx")
dest = "scenic.cmx"
},
]
resources = [
{
path = "//garnet/public/lib/escher/shaders/model_renderer/default_position.vert"
dest = "shaders/model_renderer/default_position.vert"
},
{
path = "//garnet/public/lib/escher/shaders/model_renderer/main.frag"
dest = "shaders/model_renderer/main.frag"
},
{
path = "//garnet/public/lib/escher/shaders/model_renderer/main.vert"
dest = "shaders/model_renderer/main.vert"
},
{
path = "//garnet/public/lib/escher/shaders/model_renderer/shadow_map_generation.frag"
dest = "shaders/model_renderer/shadow_map_generation.frag"
},
{
path = "//garnet/public/lib/escher/shaders/model_renderer/shadow_map_lighting.frag"
dest = "shaders/model_renderer/shadow_map_lighting.frag"
},
{
path = "//garnet/public/lib/escher/shaders/model_renderer/wobble_position.vert"
dest = "shaders/model_renderer/wobble_position.vert"
},
{
path = "//garnet/public/lib/escher/shaders/paper/common/use.glsl"
dest = "shaders/paper/common/use.glsl"
},
{
path = "//garnet/public/lib/escher/shaders/paper/frag/main_ambient_light.frag"
dest = "shaders/paper/frag/main_ambient_light.frag"
},
{
path =
"//garnet/public/lib/escher/shaders/paper/frag/main_point_light.frag"
dest = "shaders/paper/frag/main_point_light.frag"
},
{
path = "//garnet/public/lib/escher/shaders/paper/vert/compute_model_space_position.vert"
dest = "shaders/paper/vert/compute_model_space_position.vert"
},
{
path = "//garnet/public/lib/escher/shaders/paper/vert/compute_world_space_position.vert"
dest = "shaders/paper/vert/compute_world_space_position.vert"
},
{
path = "//garnet/public/lib/escher/shaders/paper/vert/main_shadow_volume_extrude.vert"
dest = "shaders/paper/vert/main_shadow_volume_extrude.vert"
},
{
path =
"//garnet/public/lib/escher/shaders/paper/vert/vertex_attributes.vert"
dest = "shaders/paper/vert/vertex_attributes.vert"
},
]
# If configured, include the vulkan validation layers.
if (scenic_enable_vulkan_validation) {
loadable_modules = vulkan_validation_layers.loadable_modules
public_deps = vulkan_validation_layers.public_deps
resources += vulkan_validation_layers.resources
}
}
# Component shell tools can be run as shell command or as components via a
# component URI. The following list contains the names of such components that
# follow the pattern:
# name/meta/name.cmx contains the component manifest
# name is the name of a subdirectory that builds the output binary `name`
component_shell_tools = [
"screencap",
"snapshot",
"gltf_export",
"set_root_view",
]
foreach(tool, component_shell_tools) {
package(tool) {
meta = [
{
path = rebase_path("$tool/meta/$tool.cmx")
dest = "$tool.cmx"
},
]
deps = [
tool,
]
binaries = [
{
name = tool
shell = true
},
]
}
}
package("set_renderer_params") {
deps = [
"set_renderer_params_HACK:set_renderer_params",
]
binaries = [
{
name = "set_renderer_params"
shell = true
},
]
meta = [
{
path =
rebase_path("set_renderer_params_HACK/meta/set_renderer_params.cmx")
dest = "set_renderer_params.cmx"
},
]
}
# Non-component tools contains the names of shell command tools that do not
# have any CMX.
non_component_tools = [
"input",
"present_view",
"print_input",
]
foreach(tool, non_component_tools) {
package(tool) {
deps = [
tool,
]
binaries = [
{
name = tool
shell = true
},
]
}
}