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
16cc_library_static {
17    name: "libcuttlefish_webrtc",
18    srcs: [
19        "lib/client_handler.cpp",
20        "lib/keyboard.cpp",
21        "lib/port_range_socket_factory.cpp",
22        "lib/streamer.cpp",
23        "lib/video_track_source_impl.cpp",
24        "lib/vp8only_encoder_factory.cpp",
25        "lib/ws_connection.cpp",
26    ],
27    cflags: [
28      // libwebrtc headers need this
29      "-Wno-unused-parameter",
30      "-DWEBRTC_POSIX",
31      "-DWEBRTC_LINUX",
32    ],
33    header_libs: [
34      "webrtc_signaling_headers",
35      "libabsl_headers",
36    ],
37    static_libs: [
38        "libhttps",
39        "libsrtp2",
40        "libcuttlefish_host_config",
41        "libcuttlefish_screen_connector",
42        "libcuttlefish_wayland_server",
43        "libgflags",
44        "libjsoncpp",
45        "libdrm",
46        "libffi",
47        "libwayland_server",
48        "libwayland_extension_server_protocols",
49        "libwebsockets",
50        "libcap",
51        "libcuttlefish_utils",
52        "libwebrtc",
53        "libabsl_base",
54        "libabsl_types",
55    ],
56    shared_libs: [
57        "libssl",
58        "libbase",
59        "libcuttlefish_fs",
60    ],
61    defaults: ["cuttlefish_host_only"],
62}
63
64cc_binary_host {
65    name: "webRTC",
66    srcs: [
67        "adb_handler.cpp",
68        "connection_observer.cpp",
69        "display_handler.cpp",
70        "main.cpp",
71        "cvd_video_frame_buffer.cpp",
72    ],
73    header_libs: [
74      "webrtc_signaling_headers",
75      "libabsl_headers",
76    ],
77    static_libs: [
78        "libabsl_base",
79        "libabsl_container",
80        "libabsl_debugging",
81        "libabsl_flags",
82        "libabsl_hash",
83        "libabsl_numeric",
84        "libabsl_status",
85        "libabsl_strings",
86        "libabsl_synchronization",
87        "libabsl_time",
88        "libabsl_types",
89        "libabsl_types",
90        "libaom",
91        "libcap",
92        "libcuttlefish_host_config",
93        "libcuttlefish_screen_connector",
94        "libcuttlefish_utils",
95        "libcuttlefish_wayland_server",
96        "libdrm",
97        "libevent",
98        "libffi",
99        "libgflags",
100        "libhttps",
101        "libjsoncpp",
102        "libopus",
103        "libsrtp2",
104        "libvpx",
105        "libwayland_extension_server_protocols",
106        "libwayland_server",
107        "libwebrtc",
108        "libcuttlefish_webrtc",
109        "libwebsockets",
110        "libyuv",
111    ],
112    shared_libs: [
113        "libbase",
114        "libcrypto",
115        "libcuttlefish_fs",
116        "libopus",
117        "libssl",
118        "libvpx",
119        "libyuv",
120    ],
121    defaults: ["cuttlefish_host_only"],
122}
123