Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / BUILD.gn
blob9e5a0a7127b5cf24788bab0b574584773fc5163b
1 # Copyright 2015 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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//build/util/version.gni")
8 import("//remoting/remoting_version.gni")
9 import("//remoting/remoting_enable.gni")
10 import("//testing/test.gni")
12 # Various remoting targets need this version definition.
13 config("version") {
14   defines = [ "VERSION=$chrome_version_full" ]
17 group("remoting_all") {
18   testonly = true
20   deps = [
21     #"//remoting:remoting_browser_test_resources",
22     "//remoting:remoting_unittests",
23     #"//remoting:remoting_webapp_unittests",
24     #"//app_remoting_test.gyp:ar_sample_test_driver",
25     #"//app_remoting_webapp.gyp:ar_sample_app",
26   ]
28   # TODO(GYP): add is_mac
29   if ((is_linux && !is_chromeos) || is_win) {
30     deps += [ "//remoting/webapp" ]
31   }
33   if (is_win) {
34     deps += [
35       #"//remoting:remoting_breakpad_tester",
36       #"//remoting:remoting_console",
37       #"//remoting:remoting_desktop",
38       #"//remoting:remoting_host_installation",
39     ]
40   }
42   if (is_android) {
43     deps += [
44       #"//remoting:remoting_apk",
45       #"//remoting:remoting_test_apk",
46       #"//remoting:remoting_unittests_apk",
47     ]
48   }
50   if (enable_remoting_host) {
51     deps += [
52       "//remoting:remoting_perftests",
53       "//remoting/host",
54       "//remoting/host:remoting_start_host",
55       "//remoting/host/it2me:remote_assistance_host",
57       #"//remoting:remoting_it2me_native_messaging_host",
58       #"//remoting:remoting_native_messaging_manifests",
59     ]
60   }
62   if (enable_me2me_host) {
63     deps += [
64       "//remoting/host:remoting_me2me_host",
65       #"//remoting/host:remoting_me2me_host_archive",
66     ]
67   }
69   # TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
70   if (enable_nacl) {
71     deps += [ "//remoting:remoting_key_tester" ]
72   }
75 # GYP version: remoting/remoting_test.gypi:remoting_test_support
76 source_set("test_support") {
77   testonly = true
79   deps = [
80     "//base",
81     "//net",
82     "//remoting/base",
83     "//remoting/client",
84     "//remoting/codec",
85     "//remoting/protocol:test_support",
86     "//remoting/resources",
87     "//remoting/signaling:test_support",
88     "//remoting/test:test_support",
89     "//testing/gmock",
90     "//testing/gtest",
91   ]
93   if (enable_configuration_policy) {
94     deps += [ "//components/policy:test_support" ]
95   }
97   if (enable_remoting_host) {
98     deps += [ "//remoting/host:test_support" ]
99   }
102 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
103 if (!is_mac) {
104   test("remoting_unittests") {
105     configs += [
106       ":version",
108       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
109       "//build/config/compiler:no_size_t_to_int_warning",
110     ]
112     deps = [
113       ":test_support",
114       "//base/allocator",
115       "//google_apis",
116       "//remoting/base:unit_tests",
117       "//remoting/client:unit_tests",
118       "//remoting/protocol:unit_tests",
119       "//remoting/signaling:unit_tests",
120       "//remoting/test:unit_tests",
121       "//testing/gmock",
122       "//testing/gtest",
123       "//third_party/webrtc",
124     ]
126     if (is_android) {
127       deps += [ "//testing/android/native_test:native_test_native_code" ]
128     }
130     if (enable_remoting_host) {
131       deps += [
132         "//remoting/codec:unit_tests",
133         "//remoting/host:unit_tests",
134         "//ui/gfx",
135       ]
136     }
138     if (enable_webrtc) {
139       deps += [
140         "//third_party/libjingle:libjingle_webrtc",
141         "//third_party/libjingle:libpeerconnection",
142       ]
143     }
144   }
146   if (enable_remoting_host) {
147     test("remoting_perftests") {
148       sources = [
149         "codec/codec_test.cc",
150         "codec/codec_test.h",
151         "codec/video_encoder_vpx_perftest.cc",
152         "test/protocol_perftest.cc",
153       ]
155       configs += [ ":version" ]
157       deps = [
158         ":test_support",
159         "//base",
160         "//base/test:run_all_unittests",
161         "//base/test:test_support",
162         "//net:test_support",
163         "//remoting/base",
164         "//testing/gtest",
165         "//third_party/webrtc/modules/desktop_capture",
166         "//third_party/libjingle",
167       ]
169       if (enable_webrtc) {
170         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
171       }
172     }
173   }
174 } else {
175   group("remoting_unittests") {
176   }
179 if (enable_pnacl) {
180   group("remoting_key_tester") {
181     deps = [
182       ":remoting_key_tester_copies",
183     ]
184   }
186   copy("remoting_key_tester_copies") {
187     sources = [
188       "tools/javascript_key_tester/background.js",
189       "tools/javascript_key_tester/chord_tracker.js",
190       "tools/javascript_key_tester/event_listeners.js",
191       "tools/javascript_key_tester/icon_128.png",
192       "tools/javascript_key_tester/main.css",
193       "tools/javascript_key_tester/main.html",
194       "tools/javascript_key_tester/main.js",
195       "tools/javascript_key_tester/manifest.json",
196       "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
198       # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
199     ]
201     outputs = [
202       "$target_out_dir/remoting/key_tester/{{source_file_part}}",
203     ]
205     deps = [
206       ":remoting_key_tester_jscompile",
207       ":remoting_key_tester_pexe",
208     ]
209   }
211   group("remoting_key_tester_jscompile") {
212     # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
213     run_jscompile = false
214     if (run_jscompile) {
215     }
216   }
218   group("remoting_key_tester_pexe") {
219     # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
220     #sources = [
221     # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",
222     #]
223   }