OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//remoting/remoting_srcs.gni") | 7 import("//remoting/remoting_version.gni") |
8 | 8 |
9 # This must be a static library instead of a source set because | |
10 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, | |
11 # which in turn depends on remoting_me2me_host_static which isn't part of that | |
12 # build. | |
13 # | |
14 # TODO fix this, successful builds should not depend on static libraries | |
15 # stripping code. | |
16 static_library("host") { | 9 static_library("host") { |
17 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources, | 10 gypi_values = exec_script("//build/gypi_to_gn.py", |
18 ".", | 11 [ rebase_path("../remoting_host_srcs.gypi") ], |
19 "//remoting") | 12 "scope", |
| 13 [ "../remoting_host_srcs.gypi" ]) |
| 14 |
| 15 sources = rebase_path(gypi_values.remoting_host_sources, ".", "//remoting") |
20 | 16 |
21 libs = [] | 17 libs = [] |
22 | 18 |
23 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 19 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
24 | 20 |
25 defines = [ "WEBRTC_CHROMIUM_BUILD" ] | 21 defines = [ "WEBRTC_CHROMIUM_BUILD" ] |
26 | 22 |
27 deps = [ | 23 deps = [ |
28 "//base:i18n", | 24 "//base:i18n", |
29 "//components/policy:policy", | 25 "//components/policy:policy", |
30 "//components/policy:policy_component_common", | 26 "//components/policy:policy_component_common", |
31 "//crypto", | 27 "//crypto", |
32 "//google_apis", | 28 "//google_apis", |
33 "//ipc", | 29 "//ipc", |
34 "//remoting/base", | 30 "//remoting/base", |
35 "//remoting/protocol", | 31 "//remoting/protocol", |
36 "//remoting/resources", | 32 "//remoting/resources", |
37 "//ui/events/platform", | 33 "//ui/events/platform", |
38 "//ui/events:dom4_keycode_converter", | 34 "//ui/events:dom4_keycode_converter", |
39 ] | 35 ] |
40 | 36 |
41 if (is_linux) { | 37 if (is_linux) { |
42 libs += [ "pam" ] | 38 libs += [ "pam" ] |
43 } | 39 } |
44 | 40 |
45 if (use_x11) { | 41 if (use_x11) { |
46 configs += [ | 42 configs += [ |
| 43 #TODO : (kelvinp) Add GTK to the configs. |
47 "//build/config/linux:x11", | 44 "//build/config/linux:x11", |
48 "//build/config/linux:xrandr", | |
49 ] | 45 ] |
50 if (!is_chromeos) { | |
51 deps += [ "//build/config/linux/gtk" ] | |
52 } | |
53 } else { | 46 } else { |
54 sources -= [ | 47 sources -= [ |
55 "clipboard_x11.cc", | 48 "clipboard_x11.cc", |
56 "linux/x_server_clipboard.cc", | 49 "linux/x_server_clipboard.cc", |
57 "linux/x_server_clipboard.h", | 50 "linux/x_server_clipboard.h", |
58 ] | 51 ] |
59 } | 52 } |
60 | 53 |
61 if (is_chromeos) { | 54 if (is_chromeos) { |
62 deps += [ | 55 deps += [ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 100 |
108 deps += [ "//google_toolbox_for_mac" ] | 101 deps += [ "//google_toolbox_for_mac" ] |
109 } | 102 } |
110 | 103 |
111 if (enable_webrtc) { | 104 if (enable_webrtc) { |
112 deps += [ | 105 deps += [ |
113 "//third_party/libjingle:libpeerconnection", | 106 "//third_party/libjingle:libpeerconnection", |
114 "//third_party/webrtc/modules/desktop_capture", | 107 "//third_party/webrtc/modules/desktop_capture", |
115 ] | 108 ] |
116 | 109 |
117 sources += rebase_path(remoting_host_srcs_gypi_values.remoting_cast_sources, | 110 sources += rebase_path(gypi_values.remoting_cast_sources, ".", "//remoting") |
118 ".", | |
119 "//remoting") | |
120 } | 111 } |
121 } | 112 } |
122 | |
123 source_set("test_support") { | |
124 testonly = true | |
125 | |
126 sources = [ | |
127 "fake_desktop_capturer.cc", | |
128 "fake_desktop_capturer.h", | |
129 "fake_desktop_environment.cc", | |
130 "fake_desktop_environment.h", | |
131 "fake_host_extension.cc", | |
132 "fake_host_extension.h", | |
133 "fake_host_status_monitor.h", | |
134 "fake_host_status_monitor.h", | |
135 "fake_mouse_cursor_monitor.cc", | |
136 "fake_mouse_cursor_monitor.h", | |
137 ] | |
138 | |
139 deps = [ | |
140 "//remoting/proto", | |
141 ] | |
142 public_deps = [ | |
143 ":host", | |
144 ] | |
145 | |
146 if (enable_webrtc) { | |
147 public_deps += [ | |
148 "//third_party/libjingle:libpeerconnection", | |
149 "//third_party/webrtc/modules/desktop_capture", | |
150 ] | |
151 } | |
152 } | |
153 | |
154 # The host portions of the remoting unit tests. | |
155 source_set("unit_tests") { | |
156 testonly = true | |
157 | |
158 sources = [ | |
159 "audio_pump_unittest.cc", | |
160 "audio_silence_detector_unittest.cc", | |
161 "capture_scheduler_unittest.cc", | |
162 "chromeos/aura_desktop_capturer_unittest.cc", | |
163 "chromeos/clipboard_aura_unittest.cc", | |
164 "chromoting_host_context_unittest.cc", | |
165 "chromoting_host_unittest.cc", | |
166 "client_session_unittest.cc", | |
167 "config_file_watcher_unittest.cc", | |
168 "daemon_process_unittest.cc", | |
169 "desktop_process_unittest.cc", | |
170 "desktop_shape_tracker_unittest.cc", | |
171 "gnubby_auth_handler_posix_unittest.cc", | |
172 "heartbeat_sender_unittest.cc", | |
173 "host_change_notification_listener_unittest.cc", | |
174 "host_config_unittest.cc", | |
175 "host_extension_session_manager_unittest.cc", | |
176 "host_mock_objects.cc", | |
177 "host_status_logger_unittest.cc", | |
178 "ipc_desktop_environment_unittest.cc", | |
179 "it2me/it2me_confirmation_dialog_proxy_unittest.cc", | |
180 "it2me/it2me_native_messaging_host_unittest.cc", | |
181 "linux/audio_pipe_reader_unittest.cc", | |
182 "linux/unicode_to_keysym_unittest.cc", | |
183 "linux/x_server_clipboard_unittest.cc", | |
184 "local_input_monitor_unittest.cc", | |
185 "mouse_shape_pump_unittest.cc", | |
186 "native_messaging/native_messaging_reader_unittest.cc", | |
187 "native_messaging/native_messaging_writer_unittest.cc", | |
188 "pairing_registry_delegate_linux_unittest.cc", | |
189 "pairing_registry_delegate_win_unittest.cc", | |
190 "pin_hash_unittest.cc", | |
191 "policy_watcher_unittest.cc", | |
192 "register_support_host_request_unittest.cc", | |
193 "remote_input_filter_unittest.cc", | |
194 "resizing_host_observer_unittest.cc", | |
195 "screen_resolution_unittest.cc", | |
196 "server_log_entry_host_unittest.cc", | |
197 "setup/me2me_native_messaging_host_unittest.cc", | |
198 "setup/oauth_helper_unittest.cc", | |
199 "setup/pin_validator_unittest.cc", | |
200 "shaped_desktop_capturer_unittest.cc", | |
201 "token_validator_factory_impl_unittest.cc", | |
202 "video_frame_pump_unittest.cc", | |
203 "video_frame_recorder_unittest.cc", | |
204 "win/rdp_client_unittest.cc", | |
205 "win/worker_process_launcher.cc", | |
206 "win/worker_process_launcher.h", | |
207 "win/worker_process_launcher_unittest.cc", | |
208 ] | |
209 | |
210 if (use_ozone || is_chromeos) { | |
211 sources -= [ "local_input_monitor_unittest.cc" ] | |
212 } | |
213 if (is_chromeos) { | |
214 sources -= [ "linux/x_server_clipboard_unittest.cc" ] | |
215 } | |
216 | |
217 deps = [ | |
218 ":host", | |
219 ":test_support", | |
220 "//components/policy:policy_component_test_support", | |
221 "//remoting/host/setup", | |
222 "//remoting/host/it2me:common", | |
223 "//remoting/host/native_messaging", | |
224 "//remoting/proto", | |
225 "//skia", | |
226 "//testing/gmock", | |
227 "//testing/gtest", | |
228 ] | |
229 } | |
OLD | NEW |