1//
2// Copyright (C) 2020 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_library {
21    name: "libcuttlefish_webrtc_commands_proto",
22    host_supported: true,
23    proto: {
24        export_proto_headers: true,
25        canonical_path_from_root: false,
26        include_dirs: [
27            "external/googleapis",
28            "external/protobuf/src",
29        ],
30        type: "full",
31    },
32    srcs: [
33        "webrtc_commands.proto",
34    ],
35    target: {
36        darwin: {
37            enabled: true,
38        },
39    },
40    shared_libs: [
41        "libgoogleapis-status-proto",
42        "libprotobuf-cpp-full",
43    ],
44    defaults: [
45        "cuttlefish_host",
46        "cvd_cc_defaults",
47    ],
48}
49
50cc_library {
51    name: "libcuttlefish_webrtc_command_channel",
52    srcs: [
53        "webrtc_command_channel.cpp",
54    ],
55    shared_libs: [
56        "libbase",
57        "libgoogleapis-status-proto",
58        "libprotobuf-cpp-full",
59    ],
60    static_libs: [
61        "libcuttlefish_fs",
62        "libcuttlefish_transport",
63        "libcuttlefish_utils",
64        "libcuttlefish_webrtc_commands_proto",
65    ],
66    target: {
67        darwin: {
68            enabled: true,
69        },
70    },
71    defaults: [
72        "cuttlefish_host",
73        "cvd_cc_defaults",
74    ],
75}
76
77cc_binary_host {
78    name: "webRTC",
79    srcs: [
80        "adb_handler.cpp",
81        "audio_handler.cpp",
82        "bluetooth_handler.cpp",
83        "client_server.cpp",
84        "connection_observer.cpp",
85        "cvd_video_frame_buffer.cpp",
86        "display_handler.cpp",
87        "gpx_locations_handler.cpp",
88        "kernel_log_events_handler.cpp",
89        "kml_locations_handler.cpp",
90        "location_handler.cpp",
91        "main.cpp",
92        "screenshot_handler.cpp",
93        "sensors_handler.cpp",
94        "sensors_simulator.cpp",
95    ],
96    cflags: [
97        // libwebrtc headers need this
98        "-DWEBRTC_LINUX",
99        "-DWEBRTC_POSIX",
100        "-D_XOPEN_SOURCE",
101        "-Wno-unused-parameter",
102    ],
103    header_libs: [
104        "libcuttlefish_confui_host_headers",
105        "libdrm_headers",
106        "libeigen",
107        "webrtc_signaling_headers",
108    ],
109    static_libs: [
110        "libabsl_host",
111        "libaom",
112        "libcap",
113        "libcn-cbor",
114        "libcuttlefish_audio_connector",
115        "libcuttlefish_confui",
116        "libcuttlefish_confui_host",
117        "libcuttlefish_host_config",
118        "libcuttlefish_input_connector",
119        "libcuttlefish_screen_connector",
120        "libcuttlefish_security",
121        "libcuttlefish_transport",
122        "libcuttlefish_utils",
123        "libcuttlefish_wayland_server",
124        "libcuttlefish_webrtc_command_channel",
125        "libcuttlefish_webrtc_commands_proto",
126        "libcuttlefish_webrtc_common",
127        "libcuttlefish_webrtc_device",
128        "libcvd_gnss_grpc_proxy",
129        "libdrm",
130        "libevent",
131        "libffi",
132        "libft2.nodep",
133        "libgflags",
134        "liblocation",
135        "libopus",
136        "libskia",
137        "libsrtp2",
138        "libteeui",
139        "libteeui_localization",
140        "libvpx",
141        "libwayland_crosvm_gpu_display_extension_server_protocols",
142        "libwayland_extension_server_protocols",
143        "libwayland_server",
144        "libwebrtc",
145        "libwebsockets",
146        "libyuv",
147    ],
148    shared_libs: [
149        "[email protected]",
150        "libbase",
151        "libcrypto",
152        "libcuttlefish_fs",
153        "libcuttlefish_kernel_log_monitor_utils",
154        "libfruit",
155        "libgoogleapis-status-proto",
156        "libgrpc++_unsecure",
157        "libjsoncpp",
158        "libopus",
159        "libprotobuf-cpp-full",
160        "libssl",
161        "libvpx",
162        "libwebm_mkvmuxer",
163        "libxml2",
164        "libyuv",
165    ],
166    defaults: [
167        "cuttlefish_buildhost_only",
168        "skia_deps",
169    ],
170}
171