xref: /aosp_15_r20/external/openscreen/cast/protocol/BUILD.gn (revision 3f982cf4871df8771c9d4abe6e9a6f8d829b2736)
1# Copyright 2020 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/data_headers_template.gni")
6import("//build_overrides/build.gni")
7assert(!build_with_chromium)
8
9data_headers("castv2_schema_headers") {
10  namespace = "cast"
11  sources = [
12    "castv2/receiver_schema.json",
13    "castv2/streaming_schema.json",
14  ]
15}
16
17source_set("castv2") {
18  sources = [
19    "castv2/validation.cc",
20    "castv2/validation.h",
21  ]
22
23  public_deps = [ "../../third_party/jsoncpp" ]
24
25  deps = [
26    ":castv2_schema_headers",
27    "../../util",
28    "//third_party/valijson",
29  ]
30
31  public_configs = [ "../../build:openscreen_include_dirs" ]
32}
33
34data_headers("streaming_examples") {
35  testonly = true
36  namespace = "cast"
37  sources = [
38    "castv2/streaming_examples/answer.json",
39    "castv2/streaming_examples/capabilities_response.json",
40    "castv2/streaming_examples/get_capabilities.json",
41    "castv2/streaming_examples/get_status.json",
42    "castv2/streaming_examples/offer.json",
43    "castv2/streaming_examples/rpc.json",
44    "castv2/streaming_examples/status_response.json",
45  ]
46}
47
48data_headers("receiver_examples") {
49  testonly = true
50  namespace = "cast"
51  sources = [
52    "castv2/receiver_examples/get_app_availability.json",
53    "castv2/receiver_examples/get_app_availability_response.json",
54    "castv2/receiver_examples/launch.json",
55    "castv2/receiver_examples/stop.json",
56  ]
57}
58
59source_set("unittests") {
60  testonly = true
61
62  sources = [ "castv2/validation_unittest.cc" ]
63
64  deps = [
65    ":castv2",
66    ":castv2_schema_headers",
67    ":receiver_examples",
68    ":streaming_examples",
69    "../../platform:base",
70    "../../third_party/abseil",
71    "../../third_party/googletest:gmock",
72    "../../third_party/googletest:gtest",
73    "../../util:base",
74    "//third_party/valijson",
75  ]
76}
77