Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / remoting / BUILD.gn
blob832549a2f0e44f36e59147a2d9ca42ed166a8bf0
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/test:chromoting_test_driver",
25     #"//remoting:remoting_webapp_unittests",
26     #"//app_remoting_test.gyp:ar_sample_test_driver",
27     "//remoting/webapp:ar_sample_app",
28   ]
30   # TODO(GYP): add is_mac
31   if ((is_linux && !is_chromeos) || is_win) {
32     deps += [ "//remoting/webapp" ]
33   }
35   if (is_win) {
36     deps += [
37       #"//remoting:remoting_breakpad_tester",
38       #"//remoting:remoting_console",
39       #"//remoting:remoting_desktop",
40       #"//remoting:remoting_host_installation",
41     ]
42   }
44   if (is_android) {
45     deps += [
46       #"//remoting:remoting_apk",
47       #"//remoting:remoting_test_apk",
48       #"//remoting:remoting_unittests_apk",
49     ]
50   }
52   if (enable_remoting_host) {
53     deps += [
54       "//remoting:remoting_perftests",
55       "//remoting/host",
56       "//remoting/host:remoting_start_host",
57       "//remoting/host/it2me:remote_assistance_host",
59       #"//remoting:remoting_it2me_native_messaging_host",
60       #"//remoting:remoting_native_messaging_manifests",
61     ]
62   }
64   if (enable_me2me_host) {
65     deps += [
66       "//remoting/host:remoting_me2me_host",
67       #"//remoting/host:remoting_me2me_host_archive",
68     ]
69   }
71   if (enable_pnacl) {
72     deps += [ "//remoting/tools/javascript_key_tester" ]
73   }
76 # GYP version: remoting/remoting_test.gypi:remoting_test_support
77 source_set("test_support") {
78   testonly = true
80   deps = [
81     "//base",
82     "//net",
83     "//remoting/base",
84     "//remoting/client",
85     "//remoting/codec",
86     "//remoting/protocol:test_support",
87     "//remoting/resources",
88     "//remoting/signaling:test_support",
89     "//remoting/test:test_support",
90     "//testing/gmock",
91     "//testing/gtest",
92   ]
94   if (enable_configuration_policy) {
95     deps += [ "//components/policy:test_support" ]
96   }
98   if (enable_remoting_host) {
99     deps += [ "//remoting/host:test_support" ]
100   }
103 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
104 if (!is_mac) {
105   # TODO(GYP): Delete this after we've converted everything to GN.
106   # The _run targets exist only for compatibility w/ GYP.
107   group("remoting_unittests_run") {
108     testonly = true
109     deps = [
110       ":remoting_unittests",
111     ]
112   }
114   test("remoting_unittests") {
115     configs += [
116       ":version",
118       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
119       "//build/config/compiler:no_size_t_to_int_warning",
120     ]
122     data = [
123       "//net/data/ssl/certificates/ok_cert.pem",
124       "//net/data/ssl/certificates/unittest.key.bin",
125       "//net/data/ssl/certificates/unittest.selfsigned.der",
126     ]
128     deps = [
129       ":test_support",
130       "//base/allocator",
131       "//google_apis",
132       "//remoting/base:unit_tests",
133       "//remoting/client:unit_tests",
134       "//remoting/protocol:unit_tests",
135       "//remoting/signaling:unit_tests",
136       "//remoting/test:unit_tests",
137       "//testing/gmock",
138       "//testing/gtest",
139       "//third_party/webrtc",
140     ]
142     if (is_android) {
143       deps += [ "//testing/android/native_test:native_test_native_code" ]
144     }
146     if (enable_remoting_host) {
147       deps += [
148         "//remoting/codec:unit_tests",
149         "//remoting/host:unit_tests",
150         "//ui/gfx",
151       ]
152     }
154     if (enable_webrtc) {
155       deps += [
156         "//third_party/libjingle:libjingle_webrtc",
157         "//third_party/libjingle:libpeerconnection",
158       ]
159     }
160   }
162   if (enable_remoting_host) {
163     test("remoting_perftests") {
164       sources = [
165         "codec/codec_test.cc",
166         "codec/codec_test.h",
167         "codec/video_encoder_vpx_perftest.cc",
168         "test/protocol_perftest.cc",
169       ]
171       configs += [ ":version" ]
173       deps = [
174         ":test_support",
175         "//base",
176         "//base/test:run_all_unittests",
177         "//base/test:test_support",
178         "//net:test_support",
179         "//remoting/base",
180         "//testing/gtest",
181         "//third_party/webrtc/modules/desktop_capture",
182         "//third_party/libjingle",
183       ]
185       if (enable_webrtc) {
186         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
187       }
188     }
189   }
190 } else {
191   group("remoting_unittests") {
192   }