Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: remoting/host/BUILD.gn

Issue 969173002: Add remoting and PPAPI tests to GN build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/codec/BUILD.gn ('k') | remoting/host/host_event_logger_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_locales.gni")
8 import("//remoting/remoting_srcs.gni")
7 import("//remoting/remoting_version.gni") 9 import("//remoting/remoting_version.gni")
10 import("//remoting/tools/build/remoting_localize.gni")
8 11
12 # This must be a static library instead of a source set because
13 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in,
14 # which in turn depends on remoting_me2me_host_static which isn't part of that
15 # build.
16 #
17 # TODO fix this, successful builds should not depend on static libraries
18 # stripping code.
9 static_library("host") { 19 static_library("host") {
10 gypi_values = exec_script("//build/gypi_to_gn.py", 20 sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources,
11 [ rebase_path("../remoting_host_srcs.gypi") ], 21 ".",
12 "scope", 22 "//remoting")
13 [ "../remoting_host_srcs.gypi" ])
14
15 sources = rebase_path(gypi_values.remoting_host_sources, ".", "//remoting")
16 23
17 libs = [] 24 libs = []
18 25
19 configs += [ "//build/config/compiler:wexit_time_destructors" ] 26 configs += [ "//build/config/compiler:wexit_time_destructors" ]
20 27
21 defines = [ "WEBRTC_CHROMIUM_BUILD" ] 28 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
22 29
23 deps = [ 30 deps = [
24 "//base:i18n", 31 "//base:i18n",
25 "//components/policy:policy", 32 "//components/policy:policy",
26 "//components/policy:policy_component_common", 33 "//components/policy:policy_component_common",
27 "//crypto", 34 "//crypto",
28 "//google_apis", 35 "//google_apis",
29 "//ipc", 36 "//ipc",
30 "//remoting/base", 37 "//remoting/base",
31 "//remoting/protocol", 38 "//remoting/protocol",
32 "//remoting/resources", 39 "//remoting/resources",
33 "//ui/events/platform", 40 "//ui/events/platform",
34 "//ui/events:dom4_keycode_converter", 41 "//ui/events:dom4_keycode_converter",
35 ] 42 ]
36 43
37 if (is_linux && !is_chromeos) { 44 if (is_linux && !is_chromeos) {
38 libs += [ "pam" ] 45 libs += [ "pam" ]
39 } 46 }
40 47
41 if (use_x11) { 48 if (use_x11) {
42 configs += [ 49 configs += [
43 # TODO(kelvinp): Add GTK to the configs.
44 "//build/config/linux:x11", 50 "//build/config/linux:x11",
51 "//build/config/linux:xrandr",
45 ] 52 ]
53 if (!is_chromeos) {
54 deps += [ "//build/config/linux/gtk" ]
55 }
46 } else { 56 } else {
47 sources -= [ 57 sources -= [
48 "clipboard_x11.cc", 58 "clipboard_x11.cc",
49 "linux/x_server_clipboard.cc", 59 "input_injector_x11.cc",
50 "linux/x_server_clipboard.h", 60 "local_input_monitor_x11.cc",
51 ] 61 ]
62 if (is_linux) {
63 # These will already be filtered out on non-Linux.
64 sources -= [
65 "linux/x_server_clipboard.cc",
66 "linux/x_server_clipboard.h",
67 ]
68 }
52 } 69 }
53 70
54 if (is_chromeos) { 71 if (is_chromeos) {
55 deps += [ 72 deps += [
56 "//cc", 73 "//cc",
57 "//ppapi/host", 74 "//ppapi/host",
58 "//skia", 75 "//skia",
59 "//ui/aura", 76 "//ui/aura",
60 "//ui/compositor", 77 "//ui/compositor",
61 "//ui/events", 78 "//ui/events",
62 "//ui/views", 79 "//ui/views",
63 ] 80 ]
64 81
65 if (use_ash) { 82 if (use_ash) {
66 deps += [ "//ash" ] 83 deps += [ "//ash" ]
67 } 84 }
68 85
86 if (!use_x11) {
87 sources -= [ "input_injector_x11.cc" ]
88 }
89
69 if (use_ozone) { 90 if (use_ozone) {
70 sources -= [ "input_injector_x11.cc" ]
71 deps += [ "//ui/ozone" ] 91 deps += [ "//ui/ozone" ]
72 } else { 92 } else {
73 sources -= [ 93 sources -= [
74 "clipboard_x11.cc", 94 "clipboard_x11.cc",
75 "input_injector_chromeos.cc", 95 "input_injector_chromeos.cc",
76 "input_injector_chromeos.h", 96 "input_injector_chromeos.h",
77 "linux/x_server_clipboard.cc", 97 "linux/x_server_clipboard.cc",
78 "linux/x_server_clipboard.h", 98 "linux/x_server_clipboard.h",
99 "local_input_monitor_x11.cc",
79 ] 100 ]
80 } 101 }
81 102
82 sources -= [ 103 sources -= [
83 "continue_window_linux.cc", 104 "continue_window_linux.cc",
84 "disconnect_window_linux.cc", 105 "disconnect_window_linux.cc",
85 "local_input_monitor_x11.cc",
86 ] 106 ]
87 } 107 }
88 108
89 if (is_mac) { 109 if (is_mac) {
90 defines += [ 110 # TODO(GYP) Mac host_bundle_name and prefpane_bundle_name.
91 "HOST_BUNDLE_NAME=\"$host_bundle_name\"", 111 # Note if you are looking at this: It really sucks to have to synchronously
92 "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"", 112 # call into python twice to get these values. They should instead be
93 ] 113 # written into a generated header via the process_version template, and we
114 # change the source files to include that header rather than rely on these
115 # defines being set in the build.
116 #defines += [
117 # "HOST_BUNDLE_NAME=\"$host_bundle_name\"",
118 # "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"",
119 #]
94 120
95 libs += [ 121 libs += [
96 "Accelerate.framework", 122 "Accelerate.framework",
97 "libpam.a", 123 "libpam.a",
98 ] 124 ]
99 125
100 deps += [ "//google_toolbox_for_mac" ] 126 deps += [ "//google_toolbox_for_mac" ]
101 } 127 }
102 128
129 if (is_win) {
130 deps += [
131 ":messages",
132 ":remoting_lib_idl",
133 ]
134 }
135
103 if (enable_webrtc) { 136 if (enable_webrtc) {
104 deps += [ 137 deps += [
105 "//third_party/libjingle:libpeerconnection", 138 "//third_party/libjingle:libpeerconnection",
106 "//third_party/webrtc/modules/desktop_capture", 139 "//third_party/webrtc/modules/desktop_capture",
107 ] 140 ]
108 141
109 sources += rebase_path(gypi_values.remoting_cast_sources, ".", "//remoting") 142 sources += rebase_path(remoting_host_srcs_gypi_values.remoting_cast_sources,
110 } 143 ".",
111 } 144 "//remoting")
145 }
146 }
147
148 source_set("test_support") {
149 testonly = true
150
151 sources = [
152 "fake_desktop_capturer.cc",
153 "fake_desktop_capturer.h",
154 "fake_desktop_environment.cc",
155 "fake_desktop_environment.h",
156 "fake_host_extension.cc",
157 "fake_host_extension.h",
158 "fake_host_status_monitor.h",
159 "fake_host_status_monitor.h",
160 "fake_mouse_cursor_monitor.cc",
161 "fake_mouse_cursor_monitor.h",
162 ]
163
164 deps = [
165 "//remoting/proto",
166 "//testing/gtest",
167 ]
168 public_deps = [
169 ":host",
170 ]
171
172 if (enable_webrtc) {
173 public_deps += [
174 "//third_party/libjingle:libpeerconnection",
175 "//third_party/webrtc/modules/desktop_capture",
176 ]
177 }
178 }
179
180 # The host portions of the remoting unit tests.
181 source_set("unit_tests") {
182 testonly = true
183
184 sources = [
185 "audio_pump_unittest.cc",
186 "audio_silence_detector_unittest.cc",
187 "capture_scheduler_unittest.cc",
188 "chromeos/aura_desktop_capturer_unittest.cc",
189 "chromeos/clipboard_aura_unittest.cc",
190 "chromoting_host_context_unittest.cc",
191 "chromoting_host_unittest.cc",
192 "client_session_unittest.cc",
193 "config_file_watcher_unittest.cc",
194 "daemon_process_unittest.cc",
195 "desktop_process_unittest.cc",
196 "desktop_shape_tracker_unittest.cc",
197 "gnubby_auth_handler_posix_unittest.cc",
198 "heartbeat_sender_unittest.cc",
199 "host_change_notification_listener_unittest.cc",
200 "host_config_unittest.cc",
201 "host_extension_session_manager_unittest.cc",
202 "host_mock_objects.cc",
203 "host_status_logger_unittest.cc",
204 "ipc_desktop_environment_unittest.cc",
205 "it2me/it2me_confirmation_dialog_proxy_unittest.cc",
206 "it2me/it2me_native_messaging_host_unittest.cc",
207 "linux/audio_pipe_reader_unittest.cc",
208 "linux/unicode_to_keysym_unittest.cc",
209 "linux/x_server_clipboard_unittest.cc",
210 "local_input_monitor_unittest.cc",
211 "mouse_shape_pump_unittest.cc",
212 "native_messaging/native_messaging_reader_unittest.cc",
213 "native_messaging/native_messaging_writer_unittest.cc",
214 "pairing_registry_delegate_linux_unittest.cc",
215 "pairing_registry_delegate_win_unittest.cc",
216 "pin_hash_unittest.cc",
217 "policy_watcher_unittest.cc",
218 "register_support_host_request_unittest.cc",
219 "remote_input_filter_unittest.cc",
220 "resizing_host_observer_unittest.cc",
221 "screen_resolution_unittest.cc",
222 "server_log_entry_host_unittest.cc",
223 "setup/me2me_native_messaging_host_unittest.cc",
224 "setup/oauth_helper_unittest.cc",
225 "setup/pin_validator_unittest.cc",
226 "shaped_desktop_capturer_unittest.cc",
227 "token_validator_factory_impl_unittest.cc",
228 "video_frame_pump_unittest.cc",
229 "video_frame_recorder_unittest.cc",
230 "win/rdp_client_unittest.cc",
231 "win/worker_process_launcher.cc",
232 "win/worker_process_launcher.h",
233 "win/worker_process_launcher_unittest.cc",
234 ]
235
236 if (use_ozone || is_chromeos) {
237 sources -= [ "local_input_monitor_unittest.cc" ]
238 }
239 if (is_chromeos) {
240 sources -= [ "linux/x_server_clipboard_unittest.cc" ]
241 }
242
243 deps = [
244 ":host",
245 ":test_support",
246 "//components/policy:policy_component_test_support",
247 "//remoting/host/setup",
248 "//remoting/host/it2me:common",
249 "//remoting/host/native_messaging",
250 "//remoting/proto",
251 "//skia",
252 "//testing/gmock",
253 "//testing/gtest",
254 ]
255 }
256
257 if (is_win) {
258 import("//build/toolchain/win/midl.gni")
259 import("//remoting/tools/build/message_compiler.gni")
260
261 # TODO(brettw) these should not be generated via exec_script. This should be
262 # part of the build process rather than the metabuild. Instead, a script
263 # should generate a header containing the #defines for this as well as the
264 # IDL file with the values.
265 clsids = exec_script("win/get_clsids.py",
266 [
267 remoting_srcs_gypi_values.daemon_controller_guid,
268 remoting_srcs_gypi_values.rdp_desktop_session_guid,
269 version_full,
270 ],
271 "value")
272 daemon_controller_clsid = clsids[0]
273 rdp_desktop_session_clsid = clsids[1]
274
275 action("generate_idl") {
276 script = "//build/util/version.py"
277
278 inputs = [
279 "win/chromoting_lib_idl.templ",
280 ]
281 outputs = [
282 "$target_gen_dir/chromoting_lib.idl",
283 ]
284
285 args = [
286 "-e",
287 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
288 "-e",
289 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
290 rebase_path(inputs[0], root_build_dir),
291 rebase_path(outputs[0], root_build_dir),
292 ]
293 }
294
295 midl("remoting_lib_idl") {
296 sources = get_target_outputs(":generate_idl")
297 deps = [
298 ":generate_idl",
299 ]
300 }
301
302 # Makes the .mc file from the .mc.jinja file.
303 remoting_localize("messages_localizing") {
304 sources = [
305 "win/host_messages.mc.jinja2",
306 ]
307 locales = remoting_locales
308 locale_dir = webapp_locale_dir
309 encoding = "utf-16"
310
311 # This target is funny. It only produces one file and the output doesn't
312 # match the input. We want to generate remoting_host_messages.mc from
313 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
314 # output, so the following pattern produces the name we want with a template
315 # based on the input.
316 #
317 # TODO: This is for GYP compat. We should just make the names match instead.
318 output = "$target_gen_dir/remoting_{{source_name_part}}"
319 }
320
321 # Makes the .h/.rc files from the .mc file.
322 message_compiler("messages") {
323 sources = get_target_outputs(":messages_localizing")
324 deps = [
325 ":messages_localizing",
326 ]
327 }
328
329 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
330 }
OLDNEW
« no previous file with comments | « remoting/codec/BUILD.gn ('k') | remoting/host/host_event_logger_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698