blob: 6d273193a2e3f808c54fb301a939c0a678bc4487 [file] [edit]
# Copyright 2017 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.
config("vulkan_no_nodiscard") {
defines = [ "VULKAN_HPP_NO_NODISCARD_WARNINGS" ]
}
static_library("common") {
public_deps = [ ":common_base" ]
}
static_library("common_on_fb") {
public_deps = [ ":common_base" ]
if (is_fuchsia) {
deps = [ ":demo_harness_fuchsia_on_fb" ]
}
}
static_library("common_on_scenic") {
public_deps = [ ":common_base" ]
if (is_fuchsia) {
deps = [ ":demo_harness_fuchsia_on_scenic" ]
}
}
source_set("common_base") {
sources = [ "demo_harness.cc" ]
deps = [
":demo_base",
"//src/lib/files",
"//src/lib/fxl",
"//third_party/glm",
"//third_party/glslang/src:glslang_default_resource_limits_sources",
"//third_party/glslang/src:glslang_sources",
]
public_deps = [ ":headers" ]
libs = [
"dl",
"pthread",
]
include_dirs = [ "//lib" ]
if (is_linux) {
deps += [ ":demo_harness_glfw" ]
}
}
# "class Demo" is the base class for all demos that can be run by DemoHarness.
# Split into a separate source_set so that it can be used in tests that don't use DemoHarness.
source_set("demo_base") {
sources = [
"demo.cc",
"demo.h",
]
public_deps = [ "//src/ui/lib/escher:escher_with_glslang" ]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
source_set("demo_harness_fuchsia_on_fb") {
visibility = [ ":*" ]
sources = [
"demo_harness_fuchsia.cc",
"demo_harness_fuchsia.h",
]
deps = [
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/sys/cpp",
"//src/lib/fsl",
"//src/lib/vulkan/swapchain:image_pipe_swapchain_fb_layer",
"//src/ui/input/lib/hid",
"//zircon/system/ulib/trace-provider",
]
public_deps = [
":demo_base",
":headers",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
configs += [ ":vulkan_no_nodiscard" ]
}
source_set("demo_harness_fuchsia_on_scenic") {
visibility = [ ":*" ]
defines = [ "FUCHSIA_USE_SCENIC" ]
sources = [
"demo_harness_fuchsia.cc",
"demo_harness_fuchsia.h",
]
deps = [
"//sdk/fidl/fuchsia.element:fuchsia.element_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/ui/scenic/cpp",
"//src/lib/fsl",
"//src/lib/vulkan/swapchain:image_pipe_swapchain_layer",
"//src/ui/input/lib/hid",
"//zircon/system/ulib/trace-provider",
]
public_deps = [
":demo_base",
":headers",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
configs += [ ":vulkan_no_nodiscard" ]
}
source_set("demo_harness_glfw") {
visibility = [ ":*" ]
sources = [
"demo_harness_glfw.cc",
"demo_harness_glfw.h",
]
deps = [ "//third_party/glfw" ]
public_deps = [
":demo_base",
":headers",
]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
source_set("headers") {
visibility = [ ":*" ]
sources = [ "demo_harness.h" ]
public_deps = [ "//src/ui/lib/escher:escher_with_glslang" ]
}