| 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 -= [ "clipboard_x11.cc" ] | 47 sources -= [ |
| 55 if (is_linux) { | 48 "clipboard_x11.cc", |
| 56 # These will already be filtered out on non-Linux. | 49 "linux/x_server_clipboard.cc", |
| 57 sources -= [ | 50 "linux/x_server_clipboard.h", |
| 58 "linux/x_server_clipboard.cc", | 51 ] |
| 59 "linux/x_server_clipboard.h", | |
| 60 ] | |
| 61 } | |
| 62 } | 52 } |
| 63 | 53 |
| 64 if (is_chromeos) { | 54 if (is_chromeos) { |
| 65 deps += [ | 55 deps += [ |
| 66 "//cc", | 56 "//cc", |
| 67 "//ppapi/host", | 57 "//ppapi/host", |
| 68 "//skia", | 58 "//skia", |
| 69 "//ui/aura", | 59 "//ui/aura", |
| 70 "//ui/compositor", | 60 "//ui/compositor", |
| 71 "//ui/events", | 61 "//ui/events", |
| (...skipping 19 matching lines...) Expand all Loading... |
| 91 | 81 |
| 92 sources -= [ | 82 sources -= [ |
| 93 "continue_window_linux.cc", | 83 "continue_window_linux.cc", |
| 94 "disconnect_window_linux.cc", | 84 "disconnect_window_linux.cc", |
| 95 "local_input_monitor_x11.cc", | 85 "local_input_monitor_x11.cc", |
| 96 "remoting_me2me_host.cc", | 86 "remoting_me2me_host.cc", |
| 97 ] | 87 ] |
| 98 } | 88 } |
| 99 | 89 |
| 100 if (is_mac) { | 90 if (is_mac) { |
| 101 # TODO(GYP) Mac host_bundle_name and prefpane_bundle_name. | 91 defines += [ |
| 102 # Note if you are looking at this: It really sucks to have to synchronously | 92 "HOST_BUNDLE_NAME=\"$host_bundle_name\"", |
| 103 # call into python twice to get these values. They should instead be | 93 "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"", |
| 104 # written into a generated header via the process_version template, and we | 94 ] |
| 105 # change the source files to include that header rather than rely on these | |
| 106 # defines being set in the build. | |
| 107 #defines += [ | |
| 108 # "HOST_BUNDLE_NAME=\"$host_bundle_name\"", | |
| 109 # "PREFPANE_BUNDLE_NAME=\"$prefpane_bundle_name\"", | |
| 110 #] | |
| 111 | 95 |
| 112 libs += [ | 96 libs += [ |
| 113 "Accelerate.framework", | 97 "Accelerate.framework", |
| 114 "libpam.a", | 98 "libpam.a", |
| 115 ] | 99 ] |
| 116 | 100 |
| 117 deps += [ "//google_toolbox_for_mac" ] | 101 deps += [ "//google_toolbox_for_mac" ] |
| 118 } | 102 } |
| 119 | 103 |
| 120 if (enable_webrtc) { | 104 if (enable_webrtc) { |
| 121 deps += [ | 105 deps += [ |
| 122 "//third_party/libjingle:libpeerconnection", | 106 "//third_party/libjingle:libpeerconnection", |
| 123 "//third_party/webrtc/modules/desktop_capture", | 107 "//third_party/webrtc/modules/desktop_capture", |
| 124 ] | 108 ] |
| 125 | 109 |
| 126 sources += rebase_path(remoting_host_srcs_gypi_values.remoting_cast_sources, | 110 sources += rebase_path(gypi_values.remoting_cast_sources, ".", "//remoting") |
| 127 ".", | |
| 128 "//remoting") | |
| 129 } | 111 } |
| 130 } | 112 } |
| 131 | |
| 132 source_set("test_support") { | |
| 133 testonly = true | |
| 134 | |
| 135 sources = [ | |
| 136 "fake_desktop_capturer.cc", | |
| 137 "fake_desktop_capturer.h", | |
| 138 "fake_desktop_environment.cc", | |
| 139 "fake_desktop_environment.h", | |
| 140 "fake_host_extension.cc", | |
| 141 "fake_host_extension.h", | |
| 142 "fake_host_status_monitor.h", | |
| 143 "fake_host_status_monitor.h", | |
| 144 "fake_mouse_cursor_monitor.cc", | |
| 145 "fake_mouse_cursor_monitor.h", | |
| 146 ] | |
| 147 | |
| 148 deps = [ | |
| 149 "//remoting/proto", | |
| 150 ] | |
| 151 public_deps = [ | |
| 152 ":host", | |
| 153 ] | |
| 154 | |
| 155 if (enable_webrtc) { | |
| 156 public_deps += [ | |
| 157 "//third_party/libjingle:libpeerconnection", | |
| 158 "//third_party/webrtc/modules/desktop_capture", | |
| 159 ] | |
| 160 } | |
| 161 } | |
| 162 | |
| 163 # The host portions of the remoting unit tests. | |
| 164 source_set("unit_tests") { | |
| 165 testonly = true | |
| 166 | |
| 167 sources = [ | |
| 168 "audio_pump_unittest.cc", | |
| 169 "audio_silence_detector_unittest.cc", | |
| 170 "capture_scheduler_unittest.cc", | |
| 171 "chromeos/aura_desktop_capturer_unittest.cc", | |
| 172 "chromeos/clipboard_aura_unittest.cc", | |
| 173 "chromoting_host_context_unittest.cc", | |
| 174 "chromoting_host_unittest.cc", | |
| 175 "client_session_unittest.cc", | |
| 176 "config_file_watcher_unittest.cc", | |
| 177 "daemon_process_unittest.cc", | |
| 178 "desktop_process_unittest.cc", | |
| 179 "desktop_shape_tracker_unittest.cc", | |
| 180 "gnubby_auth_handler_posix_unittest.cc", | |
| 181 "heartbeat_sender_unittest.cc", | |
| 182 "host_change_notification_listener_unittest.cc", | |
| 183 "host_config_unittest.cc", | |
| 184 "host_extension_session_manager_unittest.cc", | |
| 185 "host_mock_objects.cc", | |
| 186 "host_status_logger_unittest.cc", | |
| 187 "ipc_desktop_environment_unittest.cc", | |
| 188 "it2me/it2me_confirmation_dialog_proxy_unittest.cc", | |
| 189 "it2me/it2me_native_messaging_host_unittest.cc", | |
| 190 "linux/audio_pipe_reader_unittest.cc", | |
| 191 "linux/unicode_to_keysym_unittest.cc", | |
| 192 "linux/x_server_clipboard_unittest.cc", | |
| 193 "local_input_monitor_unittest.cc", | |
| 194 "mouse_shape_pump_unittest.cc", | |
| 195 "native_messaging/native_messaging_reader_unittest.cc", | |
| 196 "native_messaging/native_messaging_writer_unittest.cc", | |
| 197 "pairing_registry_delegate_linux_unittest.cc", | |
| 198 "pairing_registry_delegate_win_unittest.cc", | |
| 199 "pin_hash_unittest.cc", | |
| 200 "policy_watcher_unittest.cc", | |
| 201 "register_support_host_request_unittest.cc", | |
| 202 "remote_input_filter_unittest.cc", | |
| 203 "resizing_host_observer_unittest.cc", | |
| 204 "screen_resolution_unittest.cc", | |
| 205 "server_log_entry_host_unittest.cc", | |
| 206 "setup/me2me_native_messaging_host_unittest.cc", | |
| 207 "setup/oauth_helper_unittest.cc", | |
| 208 "setup/pin_validator_unittest.cc", | |
| 209 "shaped_desktop_capturer_unittest.cc", | |
| 210 "token_validator_factory_impl_unittest.cc", | |
| 211 "video_frame_pump_unittest.cc", | |
| 212 "video_frame_recorder_unittest.cc", | |
| 213 "win/rdp_client_unittest.cc", | |
| 214 "win/worker_process_launcher.cc", | |
| 215 "win/worker_process_launcher.h", | |
| 216 "win/worker_process_launcher_unittest.cc", | |
| 217 ] | |
| 218 | |
| 219 if (use_ozone || is_chromeos) { | |
| 220 sources -= [ "local_input_monitor_unittest.cc" ] | |
| 221 } | |
| 222 if (is_chromeos) { | |
| 223 sources -= [ "linux/x_server_clipboard_unittest.cc" ] | |
| 224 } | |
| 225 | |
| 226 deps = [ | |
| 227 ":host", | |
| 228 ":test_support", | |
| 229 "//components/policy:policy_component_test_support", | |
| 230 "//remoting/host/setup", | |
| 231 "//remoting/host/it2me:common", | |
| 232 "//remoting/host/native_messaging", | |
| 233 "//remoting/proto", | |
| 234 "//skia", | |
| 235 "//testing/gmock", | |
| 236 "//testing/gtest", | |
| 237 ] | |
| 238 } | |
| OLD | NEW |