| # 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. |
| |
| import("//src/lib/vulkan/image_pipe_swapchain.gni") |
| |
| static_library("common") { |
| sources = [ "demo_harness.cc" ] |
| deps = [ |
| ":demo_base", |
| "//src/lib/fxl", |
| "//third_party/glslang:glslang_default_resource_limits_sources", |
| "//third_party/glslang:glslang_sources", |
| ] |
| public_deps = [ ":headers" ] |
| libs = [ |
| "dl", |
| "pthread", |
| ] |
| include_dirs = [ |
| "//lib", |
| "//third_party/glm", |
| ] |
| |
| if (is_fuchsia) { |
| deps += [ ":demo_harness_fuchsia" ] |
| } |
| if (is_linux) { |
| deps += [ |
| ":demo_harness_linux", |
| "//src/ui/lib/escher/shaders:linux_shader_data", |
| ] |
| } |
| } |
| |
| # "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" ] |
| } |
| |
| source_set("demo_harness_fuchsia") { |
| visibility = [ ":*" ] |
| sources = [ |
| "demo_harness_fuchsia.cc", |
| "demo_harness_fuchsia.h", |
| ] |
| deps = [ |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/vulkan/swapchain", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/trace-provider-with-fdio", |
| ] |
| public_deps = [ |
| ":demo_base", |
| ":headers", |
| "//src/ui/lib/input_reader", |
| ] |
| } |
| |
| source_set("demo_harness_linux") { |
| visibility = [ ":*" ] |
| sources = [ |
| "demo_harness_linux.cc", |
| "demo_harness_linux.h", |
| ] |
| deps = [ "//third_party/glfw" ] |
| public_deps = [ |
| ":demo_base", |
| ":headers", |
| ] |
| } |
| |
| source_set("headers") { |
| visibility = [ ":*" ] |
| sources = [ "demo_harness.h" ] |
| public_deps = [ "//src/ui/lib/escher:escher_with_glslang" ] |
| } |