blob: 1d476a96c6ba5aeefaac21525da2b313776b4424 [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',
kwiberg77eab702016-09-28 17:42:01 -070081 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kjellanderd8dd1902016-08-23 04:52:11 -070082 '<(webrtc_root)/common_video/common_video.gyp:common_video',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000083 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000084 ],
85 'sources': [
kwiberg77eab702016-09-28 17:42:01 -070086 'gmock.h',
87 'gtest.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000088 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000089 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000090 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000091 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000092 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000093 'testsupport/frame_writer.h',
henrika1d34fe92015-06-16 10:04:20 +020094 'testsupport/iosfileutils.mm',
kjellanderd8dd1902016-08-23 04:52:11 -070095 'testsupport/metrics/video_metrics.h',
96 'testsupport/metrics/video_metrics.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000097 'testsupport/mock/mock_frame_reader.h',
98 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000099 'testsupport/packet_reader.cc',
100 'testsupport/packet_reader.h',
101 'testsupport/perf_test.cc',
102 'testsupport/perf_test.h',
andrew@webrtc.orgb87cc852013-03-25 16:23:37 +0000103 'testsupport/trace_to_stderr.cc',
104 'testsupport/trace_to_stderr.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000105 ],
henrika1d34fe92015-06-16 10:04:20 +0200106 'conditions': [
107 ['OS=="ios"', {
108 'xcode_settings': {
109 'CLANG_ENABLE_OBJC_ARC': 'YES',
110 },
111 }],
Henrik Kjellander9589e2a2015-10-22 06:48:21 +0200112 ['use_x11==1', {
113 'dependencies': [
114 '<(DEPTH)/tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
115 ],
116 }],
henrika1d34fe92015-06-16 10:04:20 +0200117 ],
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000118 },
119 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000120 # Depend on this target when you want to have test_support but also the
121 # main method needed for gtest to execute!
122 'target_name': 'test_support_main',
123 'type': 'static_library',
124 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000125 'field_trial',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000126 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000127 '<(DEPTH)/testing/gmock.gyp:gmock',
128 '<(DEPTH)/testing/gtest.gyp:gtest',
129 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
asapersson01d70a32016-05-20 06:29:46 -0700130 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000131 ],
132 'sources': [
133 'run_all_unittests.cc',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000134 'test_suite.cc',
135 'test_suite.h',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000136 ],
137 },
138 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +0000139 # Depend on this target when you want to have test_support and a special
140 # main for mac which will run your test on a worker thread and consume
141 # events on the main thread. Useful if you want to access a webcam.
142 # This main will provide all the scaffolding and objective-c black magic
143 # for you. All you need to do is to implement a function in the
144 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
145 'target_name': 'test_support_main_threaded_mac',
146 'type': 'static_library',
147 'dependencies': [
148 'test_support',
149 ],
150 'sources': [
151 'testsupport/mac/run_threaded_main_mac.h',
152 'testsupport/mac/run_threaded_main_mac.mm',
153 ],
154 },
155 {
kjellander0e739342016-03-02 10:46:17 -0800156 'target_name': 'test_common',
157 'type': 'static_library',
158 'sources': [
159 'call_test.cc',
160 'call_test.h',
161 'configurable_frame_size_encoder.cc',
162 'configurable_frame_size_encoder.h',
163 'constants.cc',
164 'constants.h',
165 'direct_transport.cc',
166 'direct_transport.h',
167 'drifting_clock.cc',
168 'drifting_clock.h',
169 'encoder_settings.cc',
170 'encoder_settings.h',
171 'fake_audio_device.cc',
172 'fake_audio_device.h',
173 'fake_decoder.cc',
174 'fake_decoder.h',
175 'fake_encoder.cc',
176 'fake_encoder.h',
177 'fake_network_pipe.cc',
178 'fake_network_pipe.h',
179 'frame_generator_capturer.cc',
180 'frame_generator_capturer.h',
181 'layer_filtering_transport.cc',
182 'layer_filtering_transport.h',
183 'mock_transport.h',
184 'mock_voe_channel_proxy.h',
185 'mock_voice_engine.h',
186 'null_transport.cc',
187 'null_transport.h',
188 'rtp_rtcp_observer.h',
kjellander0e739342016-03-02 10:46:17 -0800189 'statistics.cc',
190 'statistics.h',
191 'vcm_capturer.cc',
192 'vcm_capturer.h',
kjellander0e739342016-03-02 10:46:17 -0800193 'video_capturer.h',
194 'win/run_loop_win.cc',
195 ],
196 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700197 ['OS!="win"', {
198 'sources': [
199 'run_loop.h',
200 'run_loop.cc',
kjellander0e739342016-03-02 10:46:17 -0800201 ],
202 }],
203 ],
204 'dependencies': [
205 '<(DEPTH)/testing/gmock.gyp:gmock',
206 '<(DEPTH)/testing/gtest.gyp:gtest',
207 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
nisse037ee922016-04-25 01:39:19 -0700208 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kjellander0e739342016-03-02 10:46:17 -0800209 '<(webrtc_root)/common.gyp:webrtc_common',
210 '<(webrtc_root)/modules/modules.gyp:media_file',
kjellander0e739342016-03-02 10:46:17 -0800211 '<(webrtc_root)/webrtc.gyp:webrtc',
212 'rtp_test_utils',
213 'test_support',
214 'video_test_common',
215 ],
216 },
217 {
218 'target_name': 'test_renderer',
219 'type': 'static_library',
220 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800221 'linux/glx_renderer.cc',
222 'linux/glx_renderer.h',
223 'linux/video_renderer_linux.cc',
224 'mac/video_renderer_mac.h',
225 'mac/video_renderer_mac.mm',
kjellander0e739342016-03-02 10:46:17 -0800226 'video_renderer.cc',
227 'video_renderer.h',
228 'win/d3d_renderer.cc',
229 'win/d3d_renderer.h',
230 ],
231 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700232 ['OS!="linux" and OS!="mac" and OS!="win"', {
233 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800234 'null_platform_renderer.cc',
235 ],
236 }],
kjellander0f380d82016-06-01 04:48:26 -0700237 ['OS=="linux" or OS=="mac"', {
238 'sources' : [
kjellander0e739342016-03-02 10:46:17 -0800239 'gl/gl_renderer.cc',
240 'gl/gl_renderer.h',
241 ],
242 }],
243 ['OS=="win"', {
kjellander0e739342016-03-02 10:46:17 -0800244 'include_dirs': [
245 '<(directx_sdk_path)/Include',
246 ],
247 }],
248 ['OS=="win" and clang==1', {
249 'msvs_settings': {
250 'VCCLCompilerTool': {
251 'AdditionalOptions': [
252 # Disable warnings failing when compiling with Clang on Windows.
253 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
254 '-Wno-bool-conversion',
255 '-Wno-comment',
256 '-Wno-delete-non-virtual-dtor',
257 ],
258 },
259 },
260 }],
261 ],
262 'dependencies': [
263 '<(DEPTH)/testing/gtest.gyp:gtest',
264 '<(webrtc_root)/modules/modules.gyp:media_file',
265 'test_support',
266 'video_test_common',
267 ],
268 'direct_dependent_settings': {
269 'conditions': [
270 ['OS=="linux"', {
271 'libraries': [
272 '-lXext',
273 '-lX11',
274 '-lGL',
275 ],
276 }],
277 ['OS=="android"', {
278 'libraries' : [
279 '-lGLESv2', '-llog',
280 ],
281 }],
282 ['OS=="mac"', {
283 'xcode_settings' : {
284 'OTHER_LDFLAGS' : [
285 '-framework Cocoa',
286 '-framework OpenGL',
287 '-framework CoreVideo',
288 ],
289 },
290 }],
291 ],
292 },
293 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000294 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000295}