[M120 Migration][VD] Fix UDP socket crash issue
[platform/framework/web/chromium-efl.git] / remoting / BUILD.gn
1 # Copyright 2015 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/chromeos/ui_mode.gni")
6 import("//remoting/build/config/remoting_build.gni")
7
8 group("remoting_all") {
9   testonly = true
10
11   deps = [ ":remoting_unittests" ]
12
13   if (is_win) {
14     deps += [
15       "//remoting/host/win:all",
16       "//remoting/tools:remoting_breakpad_tester",
17     ]
18
19     if (is_chrome_branded) {
20       deps += [ "//remoting/host:remoting_host_installation" ]
21     }
22   }
23
24   if (is_android) {
25     deps += [
26       "//remoting/android:remoting_apk",
27       "//remoting/android:remoting_test_apk",
28     ]
29   }
30
31   if (is_ios) {
32     deps += [
33       "//remoting/ios:all",
34       "//remoting/ios:ios_remoting_unittests",
35     ]
36   }
37
38   if (enable_remoting_host) {
39     deps += [
40       ":remoting_perftests",
41       "//remoting/host",
42     ]
43
44     if (!is_chromeos_ash && !is_android) {
45       deps += [
46         "//remoting/host:remoting_native_messaging_manifests",
47         "//remoting/host:remoting_start_host",
48       ]
49       if (!is_ios) {
50         deps += [ "//remoting/host:remoting_native_messaging_host" ]
51       }
52
53       # it2me.
54       deps += [ "//remoting/host/it2me:remote_assistance_host" ]
55       if (is_win) {
56         deps += [ "//remoting/host/it2me:remote_assistance_host_uiaccess" ]
57       }
58     }
59
60     if (is_linux) {
61       deps += [
62         "//remoting/host/crash:remoting_crash_uploader",
63         "//remoting/host/linux:remoting_dev_me2me_host",
64         "//remoting/host/linux:remoting_user_session",
65       ]
66     }
67   }
68
69   if (enable_me2me_host) {
70     deps += [ "//remoting/host:remoting_me2me_host" ]
71     if (is_chrome_branded) {
72       deps += [ "//remoting/host:remoting_me2me_host_archive" ]
73     }
74   }
75 }
76
77 group("test_support") {
78   testonly = true
79
80   deps = [
81     "//base",
82     "//net",
83     "//remoting/base:test_support",
84     "//remoting/client",
85     "//remoting/codec:decoder",
86     "//remoting/codec:encoder",
87     "//remoting/protocol:test_support",
88     "//remoting/resources",
89     "//remoting/signaling:test_support",
90     "//remoting/test:test_support",
91     "//testing/gmock",
92     "//testing/gtest",
93   ]
94
95   if (!is_ios) {
96     deps += [ "//components/policy/core/browser:test_support" ]
97   }
98
99   if (enable_remoting_host) {
100     deps += [ "//remoting/host:test_support" ]
101   }
102 }
103
104 test("remoting_unittests") {
105   defines = []
106   libs = []
107
108   configs += [ "//remoting/build/config:version" ]
109
110   deps = [
111     ":test_support",
112     "//base",
113     "//base/test:test_support",
114     "//google_apis",
115     "//remoting/base:unit_tests",
116     "//remoting/client:unit_tests",
117     "//remoting/client/audio:unit_tests",
118     "//remoting/client/input:unit_tests",
119     "//remoting/client/notification:unit_tests",
120     "//remoting/client/ui:unit_tests",
121     "//remoting/protocol:unit_tests",
122     "//remoting/signaling:unit_tests",
123     "//testing/gmock",
124     "//testing/gtest",
125   ]
126
127   if (enable_remoting_host) {
128     deps += [
129       "//remoting/codec:unit_tests",
130       "//remoting/host:unit_tests",
131       "//ui/gfx",
132     ]
133   }
134
135   deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
136
137   if (is_android) {
138     deps += [ "//net/android:net_java" ]
139
140     libs += [ "android" ]
141   }
142
143   if (is_win) {
144     defines += [ "_ALT_NO_EXCEPTIONS" ]
145
146     libs += [
147       "comctl32.lib",
148       "rpcrt4.lib",
149       "wtsapi32.lib",
150     ]
151   }
152
153   # TODO(crbug.com/1052397): Change to !is_chromeos once lacros-chrome is switched to target_os=chromeos.
154   if (!is_chromeos) {
155     deps += [ "//remoting/client/display:unit_tests" ]
156   }
157 }
158
159 if (enable_remoting_host) {
160   test("remoting_perftests") {
161     defines = []
162     libs = []
163
164     sources = [
165       "test/codec_perftest.cc",
166       "test/protocol_perftest.cc",
167     ]
168
169     configs += [ "//remoting/build/config:version" ]
170
171     deps = [
172       ":test_support",
173       "//base",
174       "//base/test:run_all_unittests",
175       "//base/test:test_support",
176       "//components/webrtc:thread_wrapper",
177       "//net:test_support",
178       "//remoting/base",
179       "//remoting/client:client",
180       "//remoting/client/audio:audio",
181       "//remoting/codec:encoder",
182       "//remoting/host:common",
183       "//remoting/host:test_support",
184       "//remoting/protocol:protocol",
185       "//remoting/signaling:test_support",
186       "//remoting/test:test_support",
187       "//testing/gtest",
188       "//third_party/webrtc_overrides:webrtc_component",
189     ]
190
191     if (is_win) {
192       defines += [ "_ALT_NO_EXCEPTIONS" ]
193
194       libs += [
195         "rpcrt4.lib",
196         "wtsapi32.lib",
197       ]
198     }
199   }
200 }