kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 1 | # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 9 | import("//build/config/ui.gni") |
| 10 | import("//testing/test.gni") |
| 11 | if (is_android) { |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 14 | |
| 15 | source_set("test") { |
| 16 | testonly = true |
| 17 | |
| 18 | deps = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 19 | ":channel_transport", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 20 | ":field_trial", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 21 | ":rtp_test_utils", |
| 22 | ":test_common", |
| 23 | ":test_renderer", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 24 | ":test_support", |
| 25 | ":test_support_main", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 26 | ":test_support_unittests", |
| 27 | ":video_test_common", |
| 28 | ] |
| 29 | } |
| 30 | |
| 31 | config("channel_transport_warnings_config") { |
| 32 | if (is_win) { |
| 33 | cflags = [ "/wd4302" ] # cast truncation |
| 34 | |
| 35 | if (is_clang) { |
| 36 | # GN orders flags on a target before flags from configs. The default config |
| 37 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 38 | # come from a config and cannot be on the target directly. |
| 39 | cflags += [ |
| 40 | "-Wno-parentheses-equality", |
| 41 | "-Wno-reorder", |
| 42 | "-Wno-tautological-constant-out-of-range-compare", |
| 43 | "-Wno-unused-private-field", |
| 44 | ] |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | source_set("channel_transport") { |
| 50 | testonly = true |
| 51 | sources = [ |
| 52 | "channel_transport/channel_transport.cc", |
| 53 | "channel_transport/channel_transport.h", |
| 54 | "channel_transport/traffic_control_win.cc", |
| 55 | "channel_transport/traffic_control_win.h", |
| 56 | "channel_transport/udp_socket2_manager_win.cc", |
| 57 | "channel_transport/udp_socket2_manager_win.h", |
| 58 | "channel_transport/udp_socket2_win.cc", |
| 59 | "channel_transport/udp_socket2_win.h", |
| 60 | "channel_transport/udp_socket_manager_posix.cc", |
| 61 | "channel_transport/udp_socket_manager_posix.h", |
| 62 | "channel_transport/udp_socket_manager_wrapper.cc", |
| 63 | "channel_transport/udp_socket_manager_wrapper.h", |
| 64 | "channel_transport/udp_socket_posix.cc", |
| 65 | "channel_transport/udp_socket_posix.h", |
| 66 | "channel_transport/udp_socket_wrapper.cc", |
| 67 | "channel_transport/udp_socket_wrapper.h", |
| 68 | "channel_transport/udp_transport.h", |
| 69 | "channel_transport/udp_transport_impl.cc", |
| 70 | "channel_transport/udp_transport_impl.h", |
| 71 | ] |
| 72 | |
| 73 | configs += [ |
| 74 | "..:common_config", |
| 75 | ":channel_transport_warnings_config", |
| 76 | ] |
| 77 | public_configs = [ "..:common_inherited_config" ] |
| 78 | |
| 79 | if (is_clang && !is_nacl) { |
| 80 | # Suppress warnings from the Chromium Clang plugin. |
| 81 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 82 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 83 | } |
| 84 | |
| 85 | deps = [ |
| 86 | "..:webrtc_common", |
| 87 | "../system_wrappers", |
| 88 | "//testing/gtest", |
| 89 | ] |
| 90 | } |
| 91 | |
| 92 | source_set("video_test_common") { |
| 93 | testonly = true |
| 94 | sources = [ |
| 95 | "fake_texture_frame.cc", |
| 96 | "fake_texture_frame.h", |
| 97 | "frame_generator.cc", |
| 98 | "frame_generator.h", |
| 99 | "frame_utils.cc", |
| 100 | "frame_utils.h", |
| 101 | ] |
| 102 | |
| 103 | configs += [ "..:common_config" ] |
| 104 | public_configs = [ "..:common_inherited_config" ] |
| 105 | |
| 106 | if (is_clang && !is_nacl) { |
| 107 | # Suppress warnings from the Chromium Clang plugin. |
| 108 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 109 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 110 | } |
| 111 | |
| 112 | deps = [ |
| 113 | "../common_video", |
| 114 | ] |
| 115 | } |
| 116 | |
| 117 | source_set("rtp_test_utils") { |
| 118 | testonly = true |
| 119 | sources = [ |
| 120 | "rtcp_packet_parser.cc", |
| 121 | "rtcp_packet_parser.h", |
| 122 | "rtp_file_reader.cc", |
| 123 | "rtp_file_reader.h", |
| 124 | "rtp_file_writer.cc", |
| 125 | "rtp_file_writer.h", |
| 126 | ] |
| 127 | |
| 128 | configs += [ "..:common_config" ] |
| 129 | public_configs = [ "..:common_inherited_config" ] |
| 130 | |
| 131 | if (is_clang && !is_nacl) { |
| 132 | # Suppress warnings from the Chromium Clang plugin. |
| 133 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 134 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 135 | } |
| 136 | |
| 137 | deps = [ |
| 138 | "..:webrtc_common", |
| 139 | "../modules/rtp_rtcp", |
| 140 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 141 | ] |
| 142 | } |
| 143 | |
| 144 | source_set("field_trial") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 145 | testonly = true |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 146 | sources = [ |
| 147 | "field_trial.cc", |
| 148 | "field_trial.h", |
| 149 | ] |
| 150 | |
| 151 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 152 | "..:webrtc_common", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 153 | "../system_wrappers", |
phoglund | 37ebcf0 | 2016-01-08 05:04:57 -0800 | [diff] [blame] | 154 | "../system_wrappers:field_trial_default", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 155 | ] |
| 156 | |
kjellander@webrtc.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 157 | configs += [ "..:common_config" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 158 | public_configs = [ "..:common_inherited_config" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 159 | } |
| 160 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 161 | source_set("test_main") { |
| 162 | testonly = true |
| 163 | sources = [ |
| 164 | "test_main.cc", |
| 165 | ] |
| 166 | |
| 167 | deps = [ |
| 168 | ":field_trial", |
| 169 | ":test_support", |
| 170 | "../system_wrappers:metrics_default", |
| 171 | "//testing/gtest", |
| 172 | "//third_party/gflags", |
| 173 | ] |
| 174 | |
| 175 | configs += [ "..:common_config" ] |
| 176 | public_configs = [ "..:common_inherited_config" ] |
| 177 | } |
| 178 | |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 179 | source_set("test_support") { |
| 180 | testonly = true |
| 181 | |
| 182 | sources = [ |
| 183 | "testsupport/fileutils.cc", |
| 184 | "testsupport/fileutils.h", |
| 185 | "testsupport/frame_reader.cc", |
| 186 | "testsupport/frame_reader.h", |
| 187 | "testsupport/frame_writer.cc", |
| 188 | "testsupport/frame_writer.h", |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 189 | "testsupport/iosfileutils.mm", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 190 | "testsupport/metrics/video_metrics.cc", |
| 191 | "testsupport/metrics/video_metrics.h", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 192 | "testsupport/mock/mock_frame_reader.h", |
| 193 | "testsupport/mock/mock_frame_writer.h", |
| 194 | "testsupport/packet_reader.cc", |
| 195 | "testsupport/packet_reader.h", |
| 196 | "testsupport/perf_test.cc", |
| 197 | "testsupport/perf_test.h", |
| 198 | "testsupport/trace_to_stderr.cc", |
| 199 | "testsupport/trace_to_stderr.h", |
| 200 | ] |
| 201 | |
| 202 | deps = [ |
kjellander | 988d31e | 2016-02-05 00:23:50 -0800 | [diff] [blame] | 203 | "../base:gtest_prod", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 204 | "../common_video", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 205 | "../system_wrappers", |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 206 | "//testing/gmock", |
| 207 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 208 | ] |
| 209 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 210 | if (is_clang) { |
| 211 | # Suppress warnings from the Chromium Clang plugin. |
| 212 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 213 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 214 | } |
| 215 | |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 216 | if (is_ios) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 217 | configs += [ "//build/config/compiler:enable_arc" ] |
| 218 | } |
| 219 | |
| 220 | if (use_x11) { |
| 221 | deps += [ "//tools/xdisplaycheck" ] |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 222 | } |
| 223 | |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 224 | if (is_android) { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 225 | deps += [ "//base:base" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 226 | } |
| 227 | |
kjellander@webrtc.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 228 | configs += [ "..:common_config" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 229 | public_configs = [ "..:common_inherited_config" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 230 | } |
| 231 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 232 | # Depend on this target when you want to have test_support but also the |
| 233 | # main method needed for gtest to execute! |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 234 | source_set("test_support_main") { |
| 235 | testonly = true |
| 236 | |
| 237 | sources = [ |
| 238 | "run_all_unittests.cc", |
| 239 | "test_suite.cc", |
| 240 | "test_suite.h", |
| 241 | ] |
| 242 | |
| 243 | deps = [ |
| 244 | ":field_trial", |
| 245 | ":test_support", |
asapersson | 01d70a3 | 2016-05-20 06:29:46 -0700 | [diff] [blame] | 246 | "../system_wrappers:metrics_default", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 247 | "//testing/gmock", |
| 248 | "//testing/gtest", |
| 249 | "//third_party/gflags", |
| 250 | ] |
| 251 | |
kjellander@webrtc.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 252 | configs += [ "..:common_config" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 253 | public_configs = [ "..:common_inherited_config" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 254 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 255 | |
| 256 | # Depend on this target when you want to have test_support and a special |
| 257 | # main for mac which will run your test on a worker thread and consume |
| 258 | # events on the main thread. Useful if you want to access a webcam. |
| 259 | # This main will provide all the scaffolding and objective-c black magic |
| 260 | # for you. All you need to do is to implement a function in the |
| 261 | # run_threaded_main_mac.h file (ImplementThisToRunYourTest). |
| 262 | source_set("test_support_main_threaded_mac") { |
| 263 | testonly = true |
| 264 | |
| 265 | sources = [ |
| 266 | "testsupport/mac/run_threaded_main_mac.h", |
| 267 | "testsupport/mac/run_threaded_main_mac.mm", |
| 268 | ] |
| 269 | |
| 270 | configs += [ "..:common_config" ] |
| 271 | public_configs = [ "..:common_inherited_config" ] |
| 272 | |
| 273 | deps = [ |
| 274 | ":test_support", |
| 275 | ] |
| 276 | } |
| 277 | |
| 278 | test("test_support_unittests") { |
| 279 | deps = [] |
| 280 | sources = [ |
| 281 | "channel_transport/udp_socket_manager_unittest.cc", |
| 282 | "channel_transport/udp_socket_wrapper_unittest.cc", |
| 283 | "channel_transport/udp_transport_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 284 | "common_unittest.cc", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 285 | "fake_network_pipe_unittest.cc", |
| 286 | "frame_generator_unittest.cc", |
| 287 | "rtp_file_reader_unittest.cc", |
| 288 | "rtp_file_writer_unittest.cc", |
| 289 | "testsupport/always_passing_unittest.cc", |
| 290 | "testsupport/fileutils_unittest.cc", |
| 291 | "testsupport/frame_reader_unittest.cc", |
| 292 | "testsupport/frame_writer_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 293 | "testsupport/metrics/video_metrics_unittest.cc", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 294 | "testsupport/packet_reader_unittest.cc", |
| 295 | "testsupport/perf_test_unittest.cc", |
| 296 | "testsupport/unittest_utils.h", |
| 297 | ] |
| 298 | |
| 299 | configs += [ "..:common_config" ] |
| 300 | public_configs = [ "..:common_inherited_config" ] |
| 301 | |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 302 | # TODO(jschuh): Bug 1348: fix this warning. |
| 303 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 304 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 305 | if (is_win) { |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 306 | cflags = [ "/wd4373" ] # virtual override w/different const/volatile signature. |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | if (is_clang) { |
| 310 | # Suppress warnings from the Chromium Clang plugin. |
| 311 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 312 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 313 | } |
| 314 | |
| 315 | if (is_android) { |
| 316 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 317 | shard_timeout = 900 |
| 318 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 319 | |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 320 | if (is_android || is_ios) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 321 | data = [ |
kjellander | d8dd190 | 2016-08-23 04:52:11 -0700 | [diff] [blame] | 322 | "//resources/foreman_cif_short.yuv", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 323 | "//resources/video_coding/frame-ethernet-ii.pcap", |
| 324 | "//resources/video_coding/frame-loopback.pcap", |
| 325 | "//resources/video_coding/pltype103.rtp", |
| 326 | "//resources/video_coding/pltype103_header_only.rtp", |
| 327 | "//resources/video_coding/ssrcs-2.pcap", |
| 328 | "//resources/video_coding/ssrcs-3.pcap", |
| 329 | ] |
| 330 | } |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 331 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 332 | deps += [ |
| 333 | ":channel_transport", |
| 334 | ":test_common", |
| 335 | ":test_support_main", |
| 336 | "../modules/video_capture", |
| 337 | "//testing/gmock", |
| 338 | "//testing/gtest", |
| 339 | ] |
| 340 | } |
| 341 | |
| 342 | source_set("test_common") { |
| 343 | testonly = true |
| 344 | sources = [ |
| 345 | "call_test.cc", |
| 346 | "call_test.h", |
| 347 | "configurable_frame_size_encoder.cc", |
| 348 | "configurable_frame_size_encoder.h", |
| 349 | "constants.cc", |
| 350 | "constants.h", |
| 351 | "direct_transport.cc", |
| 352 | "direct_transport.h", |
| 353 | "drifting_clock.cc", |
| 354 | "drifting_clock.h", |
| 355 | "encoder_settings.cc", |
| 356 | "encoder_settings.h", |
| 357 | "fake_audio_device.cc", |
| 358 | "fake_audio_device.h", |
| 359 | "fake_decoder.cc", |
| 360 | "fake_decoder.h", |
| 361 | "fake_encoder.cc", |
| 362 | "fake_encoder.h", |
| 363 | "fake_network_pipe.cc", |
| 364 | "fake_network_pipe.h", |
| 365 | "frame_generator_capturer.cc", |
| 366 | "frame_generator_capturer.h", |
| 367 | "layer_filtering_transport.cc", |
| 368 | "layer_filtering_transport.h", |
| 369 | "mock_transport.h", |
| 370 | "mock_voe_channel_proxy.h", |
| 371 | "mock_voice_engine.h", |
| 372 | "null_transport.cc", |
| 373 | "null_transport.h", |
| 374 | "rtp_rtcp_observer.h", |
| 375 | "statistics.cc", |
| 376 | "statistics.h", |
| 377 | "vcm_capturer.cc", |
| 378 | "vcm_capturer.h", |
| 379 | "video_capturer.cc", |
| 380 | "video_capturer.h", |
| 381 | "win/run_loop_win.cc", |
| 382 | ] |
| 383 | if (!is_win) { |
| 384 | sources += [ |
| 385 | "run_loop.cc", |
| 386 | "run_loop.h", |
| 387 | ] |
| 388 | } |
| 389 | |
| 390 | configs += [ "..:common_config" ] |
| 391 | public_configs = [ "..:common_inherited_config" ] |
| 392 | |
| 393 | if (is_clang && !is_nacl) { |
| 394 | # Suppress warnings from the Chromium Clang plugin. |
| 395 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 396 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 397 | } |
| 398 | |
| 399 | deps = [ |
| 400 | ":rtp_test_utils", |
| 401 | ":test_support", |
| 402 | ":video_test_common", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 403 | "..:webrtc_common", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 404 | "../audio", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 405 | "../base:rtc_base_approved", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 406 | "../call", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 407 | "../modules/media_file", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 408 | "../video", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 409 | "//testing/gmock", |
| 410 | "//testing/gtest", |
| 411 | "//third_party/gflags", |
| 412 | ] |
| 413 | } |
| 414 | |
| 415 | config("test_renderer_exported_config") { |
| 416 | if (is_win && is_clang) { |
| 417 | # GN orders flags on a target before flags from configs. The default config |
| 418 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 419 | # come from a config and cannot be on the target directly. |
ehmaldonado | 4bc4d27 | 2016-08-25 04:15:40 -0700 | [diff] [blame^] | 420 | cflags = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 421 | "-Wno-bool-conversion", |
| 422 | "-Wno-comment", |
| 423 | "-Wno-delete-non-virtual-dtor", |
| 424 | ] |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | source_set("test_renderer") { |
| 429 | testonly = true |
| 430 | libs = [] |
| 431 | sources = [ |
| 432 | "linux/glx_renderer.cc", |
| 433 | "linux/glx_renderer.h", |
| 434 | "linux/video_renderer_linux.cc", |
| 435 | "mac/video_renderer_mac.h", |
| 436 | "mac/video_renderer_mac.mm", |
| 437 | "video_renderer.cc", |
| 438 | "video_renderer.h", |
| 439 | "win/d3d_renderer.cc", |
| 440 | "win/d3d_renderer.h", |
| 441 | ] |
| 442 | if (!is_linux && !is_mac && !is_win) { |
| 443 | sources += [ "null_platform_renderer.cc" ] |
| 444 | } |
| 445 | if (is_linux || is_mac) { |
| 446 | sources += [ |
| 447 | "gl/gl_renderer.cc", |
| 448 | "gl/gl_renderer.h", |
| 449 | ] |
| 450 | } |
| 451 | |
| 452 | if (is_linux) { |
| 453 | libs += [ |
| 454 | "Xext", |
| 455 | "X11", |
| 456 | "GL", |
| 457 | ] |
| 458 | } |
| 459 | if (is_android) { |
| 460 | libs += [ |
| 461 | "GLESv2", |
| 462 | "log", |
| 463 | ] |
| 464 | } |
| 465 | if (is_mac) { |
| 466 | libs = [ |
| 467 | "Cocoa.framework", |
| 468 | "OpenGL.framework", |
| 469 | "CoreVideo.framework", |
| 470 | ] |
| 471 | } |
| 472 | |
| 473 | configs += [ "..:common_config" ] |
| 474 | public_configs = [ |
| 475 | "..:common_inherited_config", |
| 476 | ":test_renderer_exported_config", |
| 477 | ] |
| 478 | |
| 479 | if (is_clang && !is_nacl) { |
| 480 | # Suppress warnings from the Chromium Clang plugin. |
| 481 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 482 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 483 | } |
| 484 | |
| 485 | deps = [ |
| 486 | ":test_support", |
| 487 | ":video_test_common", |
| 488 | "../modules/media_file", |
| 489 | "//testing/gtest", |
| 490 | ] |
| 491 | } |