blob: ae36da8ffe7d8f9362bb70142ca98e9c1d5cb07c [file] [log] [blame]
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +00001# Copyright (c) 2011 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
9# TODO(andrew): consider moving test_support to src/base/test.
10{
11 'includes': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000012 '../build/common.gypi',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000013 ],
14 'targets': [
15 {
Niels Möller739fcb92016-02-29 13:11:45 +010016 'target_name': 'video_test_common',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000017 'type': 'static_library',
18 'sources': [
Peter Boström13f61df2016-01-04 22:36:38 +010019 'fake_texture_frame.cc',
20 'fake_texture_frame.h',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000021 'frame_generator.cc',
22 'frame_generator.h',
Niels Möller739fcb92016-02-29 13:11:45 +010023 'frame_utils.cc',
24 'frame_utils.h',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000025 ],
26 'dependencies': [
27 '<(webrtc_root)/common_video/common_video.gyp:common_video',
28 ],
29 },
30 {
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000031 'target_name': 'rtp_test_utils',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000032 'type': 'static_library',
33 'sources': [
34 'rtcp_packet_parser.cc',
35 'rtcp_packet_parser.h',
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000036 'rtp_file_reader.cc',
37 'rtp_file_reader.h',
henrik.lundin@webrtc.org83317142014-12-01 11:25:04 +000038 'rtp_file_writer.cc',
39 'rtp_file_writer.h',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000040 ],
41 'dependencies': [
asapersson@webrtc.org37c05592015-01-28 13:58:27 +000042 '<(DEPTH)/testing/gtest.gyp:gtest',
kjellanderf6b55092016-02-07 23:04:26 -080043 '<(webrtc_root)/common.gyp:webrtc_common',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000044 '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
45 ],
46 },
47 {
andresp@webrtc.org60015d22014-05-16 09:39:51 +000048 'target_name': 'field_trial',
49 'type': 'static_library',
50 'sources': [
51 'field_trial.cc',
52 'field_trial.h',
53 ],
54 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000055 '<(webrtc_root)/common.gyp:webrtc_common',
phoglund37ebcf02016-01-08 05:04:57 -080056 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000057 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andresp@webrtc.org60015d22014-05-16 09:39:51 +000058 ],
59 },
60 {
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000061 'target_name': 'test_main',
62 'type': 'static_library',
63 'sources': [
64 'test_main.cc',
65 ],
66 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +000067 'field_trial',
Peter Boström95192fb2015-10-29 12:41:56 +010068 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +000069 '<(DEPTH)/testing/gtest.gyp:gtest',
70 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
asapersson01d70a32016-05-20 06:29:46 -070071 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000072 ],
73 },
74 {
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000075 'target_name': 'test_support',
76 'type': 'static_library',
77 'dependencies': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000078 '<(DEPTH)/testing/gtest.gyp:gtest',
79 '<(DEPTH)/testing/gmock.gyp:gmock',
kjellander988d31e2016-02-05 00:23:50 -080080 '<(webrtc_root)/base/base.gyp:gtest_prod',
kjellanderd8dd1902016-08-23 04:52:11 -070081 '<(webrtc_root)/common_video/common_video.gyp:common_video',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000082 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000083 ],
84 'sources': [
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000085 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000086 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000087 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000088 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000089 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000090 'testsupport/frame_writer.h',
henrika1d34fe92015-06-16 10:04:20 +020091 'testsupport/iosfileutils.mm',
kjellanderd8dd1902016-08-23 04:52:11 -070092 'testsupport/metrics/video_metrics.h',
93 'testsupport/metrics/video_metrics.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000094 'testsupport/mock/mock_frame_reader.h',
95 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000096 'testsupport/packet_reader.cc',
97 'testsupport/packet_reader.h',
98 'testsupport/perf_test.cc',
99 'testsupport/perf_test.h',
andrew@webrtc.orgb87cc852013-03-25 16:23:37 +0000100 'testsupport/trace_to_stderr.cc',
101 'testsupport/trace_to_stderr.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000102 ],
henrika1d34fe92015-06-16 10:04:20 +0200103 'conditions': [
104 ['OS=="ios"', {
105 'xcode_settings': {
106 'CLANG_ENABLE_OBJC_ARC': 'YES',
107 },
108 }],
Henrik Kjellander9589e2a2015-10-22 06:48:21 +0200109 ['use_x11==1', {
110 'dependencies': [
111 '<(DEPTH)/tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
112 ],
113 }],
henrika1d34fe92015-06-16 10:04:20 +0200114 ],
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000115 },
116 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000117 # Depend on this target when you want to have test_support but also the
118 # main method needed for gtest to execute!
119 'target_name': 'test_support_main',
120 'type': 'static_library',
121 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000122 'field_trial',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000123 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000124 '<(DEPTH)/testing/gmock.gyp:gmock',
125 '<(DEPTH)/testing/gtest.gyp:gtest',
126 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
asapersson01d70a32016-05-20 06:29:46 -0700127 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000128 ],
129 'sources': [
130 'run_all_unittests.cc',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000131 'test_suite.cc',
132 'test_suite.h',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000133 ],
134 },
135 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +0000136 # Depend on this target when you want to have test_support and a special
137 # main for mac which will run your test on a worker thread and consume
138 # events on the main thread. Useful if you want to access a webcam.
139 # This main will provide all the scaffolding and objective-c black magic
140 # for you. All you need to do is to implement a function in the
141 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
142 'target_name': 'test_support_main_threaded_mac',
143 'type': 'static_library',
144 'dependencies': [
145 'test_support',
146 ],
147 'sources': [
148 'testsupport/mac/run_threaded_main_mac.h',
149 'testsupport/mac/run_threaded_main_mac.mm',
150 ],
151 },
152 {
kjellander0e739342016-03-02 10:46:17 -0800153 'target_name': 'test_common',
154 'type': 'static_library',
155 'sources': [
156 'call_test.cc',
157 'call_test.h',
158 'configurable_frame_size_encoder.cc',
159 'configurable_frame_size_encoder.h',
160 'constants.cc',
161 'constants.h',
162 'direct_transport.cc',
163 'direct_transport.h',
164 'drifting_clock.cc',
165 'drifting_clock.h',
166 'encoder_settings.cc',
167 'encoder_settings.h',
168 'fake_audio_device.cc',
169 'fake_audio_device.h',
170 'fake_decoder.cc',
171 'fake_decoder.h',
172 'fake_encoder.cc',
173 'fake_encoder.h',
174 'fake_network_pipe.cc',
175 'fake_network_pipe.h',
176 'frame_generator_capturer.cc',
177 'frame_generator_capturer.h',
178 'layer_filtering_transport.cc',
179 'layer_filtering_transport.h',
180 'mock_transport.h',
181 'mock_voe_channel_proxy.h',
182 'mock_voice_engine.h',
183 'null_transport.cc',
184 'null_transport.h',
185 'rtp_rtcp_observer.h',
kjellander0e739342016-03-02 10:46:17 -0800186 'statistics.cc',
187 'statistics.h',
188 'vcm_capturer.cc',
189 'vcm_capturer.h',
kjellander0e739342016-03-02 10:46:17 -0800190 'video_capturer.h',
191 'win/run_loop_win.cc',
192 ],
193 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700194 ['OS!="win"', {
195 'sources': [
196 'run_loop.h',
197 'run_loop.cc',
kjellander0e739342016-03-02 10:46:17 -0800198 ],
199 }],
200 ],
201 'dependencies': [
202 '<(DEPTH)/testing/gmock.gyp:gmock',
203 '<(DEPTH)/testing/gtest.gyp:gtest',
204 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
nisse037ee922016-04-25 01:39:19 -0700205 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kjellander0e739342016-03-02 10:46:17 -0800206 '<(webrtc_root)/common.gyp:webrtc_common',
207 '<(webrtc_root)/modules/modules.gyp:media_file',
kjellander0e739342016-03-02 10:46:17 -0800208 '<(webrtc_root)/webrtc.gyp:webrtc',
209 'rtp_test_utils',
210 'test_support',
211 'video_test_common',
212 ],
213 },
214 {
215 'target_name': 'test_renderer',
216 'type': 'static_library',
217 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800218 'linux/glx_renderer.cc',
219 'linux/glx_renderer.h',
220 'linux/video_renderer_linux.cc',
221 'mac/video_renderer_mac.h',
222 'mac/video_renderer_mac.mm',
kjellander0e739342016-03-02 10:46:17 -0800223 'video_renderer.cc',
224 'video_renderer.h',
225 'win/d3d_renderer.cc',
226 'win/d3d_renderer.h',
227 ],
228 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700229 ['OS!="linux" and OS!="mac" and OS!="win"', {
230 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800231 'null_platform_renderer.cc',
232 ],
233 }],
kjellander0f380d82016-06-01 04:48:26 -0700234 ['OS=="linux" or OS=="mac"', {
235 'sources' : [
kjellander0e739342016-03-02 10:46:17 -0800236 'gl/gl_renderer.cc',
237 'gl/gl_renderer.h',
238 ],
239 }],
240 ['OS=="win"', {
kjellander0e739342016-03-02 10:46:17 -0800241 'include_dirs': [
242 '<(directx_sdk_path)/Include',
243 ],
244 }],
245 ['OS=="win" and clang==1', {
246 'msvs_settings': {
247 'VCCLCompilerTool': {
248 'AdditionalOptions': [
249 # Disable warnings failing when compiling with Clang on Windows.
250 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
251 '-Wno-bool-conversion',
252 '-Wno-comment',
253 '-Wno-delete-non-virtual-dtor',
254 ],
255 },
256 },
257 }],
258 ],
259 'dependencies': [
260 '<(DEPTH)/testing/gtest.gyp:gtest',
261 '<(webrtc_root)/modules/modules.gyp:media_file',
262 'test_support',
263 'video_test_common',
264 ],
265 'direct_dependent_settings': {
266 'conditions': [
267 ['OS=="linux"', {
268 'libraries': [
269 '-lXext',
270 '-lX11',
271 '-lGL',
272 ],
273 }],
274 ['OS=="android"', {
275 'libraries' : [
276 '-lGLESv2', '-llog',
277 ],
278 }],
279 ['OS=="mac"', {
280 'xcode_settings' : {
281 'OTHER_LDFLAGS' : [
282 '-framework Cocoa',
283 '-framework OpenGL',
284 '-framework CoreVideo',
285 ],
286 },
287 }],
288 ],
289 },
290 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000291 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000292}