| # 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("../gn/build_rules.gni") |
| |
| config("spinel_public_config") { |
| include_dirs = [ "include" ] |
| } |
| |
| source_set("spinel_headers") { |
| public = [ |
| "include/spinel/spinel.h", |
| "include/spinel/spinel_assert.h", |
| "include/spinel/spinel_opcodes.h", |
| "include/spinel/spinel_result.h", |
| "include/spinel/spinel_types.h", |
| "include/spinel/spinel_vk.h", |
| "include/spinel/spinel_vk_types.h", |
| ] |
| sources = [ |
| "include/spinel/spinel.h", |
| "include/spinel/spinel_assert.h", |
| "include/spinel/spinel_opcodes.h", |
| "include/spinel/spinel_result.h", |
| "include/spinel/spinel_types.h", |
| "include/spinel/spinel_vk.h", |
| "include/spinel/spinel_vk_types.h", |
| ] |
| public_configs = [ ":spinel_public_config" ] |
| } |
| |
| static_library("spinel") { |
| friend = [ |
| "platforms/vk", |
| "platforms/vk/tests", |
| ] |
| sources = [ |
| "allocator_host.c", |
| "allocator_host.h", |
| "composition.c", |
| "composition.h", |
| "context.c", |
| "context.h", |
| "core.h", |
| "core_c.h", |
| "path_builder.c", |
| "path_builder.h", |
| "raster_builder.c", |
| "raster_builder.h", |
| "spinel_assert.c", |
| "state_assert.h", |
| "styling.c", |
| "styling.h", |
| "suballocator.c", |
| "suballocator.h", |
| "trace.h", |
| "weakref.c", |
| "weakref.h", |
| ] |
| deps = [ "${graphics_compute_dir}/common" ] |
| public_deps = [ ":spinel_headers" ] |
| configs += [ |
| # TODO(fxb/58162): delete the below and fix compiler warnings |
| "//build/config:Wno-conversion", |
| ] |
| } |
| |
| group("spinel_ext_unittests") { |
| testonly = true |
| public_deps = [ "ext/svg2spinel:svg2spinel_unittests" ] |
| } |
| |
| # This group provides a target that tests can link against. |
| # It provides the Vulkan-based Spinel API, and the vk_find_targets |
| # loader library that simply links all target files into the library |
| # itself for easier deployments. |
| |
| group("spinel_vk_for_tests") { |
| public_deps = [ |
| ":spinel", |
| "platforms/vk:vk", |
| "platforms/vk:vk_find_target", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ "platforms/vk/tests" ] |
| } |
| |
| group("vk_unittests") { |
| testonly = true |
| public_deps = [ "platforms/vk/tests:vk_unittests" ] |
| } |