Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / voice_engine / voice_engine.gyp
1 # 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 {
10   'includes': [
11     '../build/common.gypi',
12   ],
13   'targets': [
14     {
15       'target_name': 'voice_engine',
16       'type': 'static_library',
17       'dependencies': [
18         '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
19         '<(webrtc_root)/modules/modules.gyp:audio_coding_module',
20         '<(webrtc_root)/modules/modules.gyp:audio_conference_mixer',
21         '<(webrtc_root)/modules/modules.gyp:audio_device',
22         '<(webrtc_root)/modules/modules.gyp:audio_processing',
23         '<(webrtc_root)/modules/modules.gyp:media_file',
24         '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
25         '<(webrtc_root)/modules/modules.gyp:webrtc_utility',
26         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
27       ],
28       'sources': [
29         '../common_types.h',
30         '../engine_configurations.h',
31         '../typedefs.h',
32         'include/voe_audio_processing.h',
33         'include/voe_base.h',
34         'include/voe_codec.h',
35         'include/voe_dtmf.h',
36         'include/voe_errors.h',
37         'include/voe_external_media.h',
38         'include/voe_file.h',
39         'include/voe_hardware.h',
40         'include/voe_neteq_stats.h',
41         'include/voe_network.h',
42         'include/voe_rtp_rtcp.h',
43         'include/voe_video_sync.h',
44         'include/voe_volume_control.h',
45         'channel.cc',
46         'channel.h',
47         'channel_manager.cc',
48         'channel_manager.h',
49         'dtmf_inband.cc',
50         'dtmf_inband.h',
51         'dtmf_inband_queue.cc',
52         'dtmf_inband_queue.h',
53         'level_indicator.cc',
54         'level_indicator.h',
55         'monitor_module.cc',
56         'monitor_module.h',
57         'output_mixer.cc',
58         'output_mixer.h',
59         'shared_data.cc',
60         'shared_data.h',
61         'statistics.cc',
62         'statistics.h',
63         'transmit_mixer.cc',
64         'transmit_mixer.h',
65         'utility.cc',
66         'utility.h',
67         'voe_audio_processing_impl.cc',
68         'voe_audio_processing_impl.h',
69         'voe_base_impl.cc',
70         'voe_base_impl.h',
71         'voe_codec_impl.cc',
72         'voe_codec_impl.h',
73         'voe_dtmf_impl.cc',
74         'voe_dtmf_impl.h',
75         'voe_external_media_impl.cc',
76         'voe_external_media_impl.h',
77         'voe_file_impl.cc',
78         'voe_file_impl.h',
79         'voe_hardware_impl.cc',
80         'voe_hardware_impl.h',
81         'voe_neteq_stats_impl.cc',
82         'voe_neteq_stats_impl.h',
83         'voe_network_impl.cc',
84         'voe_network_impl.h',
85         'voe_rtp_rtcp_impl.cc',
86         'voe_rtp_rtcp_impl.h',
87         'voe_video_sync_impl.cc',
88         'voe_video_sync_impl.h',
89         'voe_volume_control_impl.cc',
90         'voe_volume_control_impl.h',
91         'voice_engine_defines.h',
92         'voice_engine_impl.cc',
93         'voice_engine_impl.h',
94       ],
95     },
96   ],
97   'conditions': [
98     ['OS=="win"', {
99       'defines': ['WEBRTC_DRIFT_COMPENSATION_SUPPORTED',],
100     }],
101     ['include_tests==1', {
102       'targets': [
103         {
104           'target_name': 'voice_engine_unittests',
105           'type': '<(gtest_target_type)',
106           'dependencies': [
107             'voice_engine',
108             '<(DEPTH)/testing/gtest.gyp:gtest',
109             # The rest are to satisfy the unittests' include chain.
110             # This would be unnecessary if we used qualified includes.
111             '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
112             '<(webrtc_root)/modules/modules.gyp:audio_device',
113             '<(webrtc_root)/modules/modules.gyp:audio_processing',
114             '<(webrtc_root)/modules/modules.gyp:audio_coding_module',
115             '<(webrtc_root)/modules/modules.gyp:audio_conference_mixer',
116             '<(webrtc_root)/modules/modules.gyp:media_file',
117             '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
118             '<(webrtc_root)/modules/modules.gyp:webrtc_utility',
119             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
120             '<(webrtc_root)/test/test.gyp:test_support_main',
121           ],
122           'sources': [
123             'channel_unittest.cc',
124             'transmit_mixer_unittest.cc',
125             'utility_unittest.cc',
126             'voe_audio_processing_unittest.cc',
127             'voe_base_unittest.cc',
128             'voe_codec_unittest.cc',
129           ],
130           'conditions': [
131             # TODO(henrike): remove build_with_chromium==1 when the bots are
132             # using Chromium's buildbots.
133             ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
134               'dependencies': [
135                 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
136               ],
137             }],
138           ],
139         },
140         {
141           'target_name': 'voe_auto_test',
142           'type': 'executable',
143           'dependencies': [
144             'voice_engine',
145             '<(DEPTH)/testing/gmock.gyp:gmock',
146             '<(DEPTH)/testing/gtest.gyp:gtest',
147             '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
148             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
149             '<(webrtc_root)/test/test.gyp:channel_transport',
150             '<(webrtc_root)/test/test.gyp:test_support',
151            ],
152           'sources': [
153             'test/auto_test/automated_mode.cc',
154             'test/auto_test/extended/agc_config_test.cc',
155             'test/auto_test/extended/ec_metrics_test.cc',
156             'test/auto_test/fakes/fake_external_transport.cc',
157             'test/auto_test/fakes/fake_external_transport.h',
158             'test/auto_test/fixtures/after_initialization_fixture.cc',
159             'test/auto_test/fixtures/after_initialization_fixture.h',
160             'test/auto_test/fixtures/after_streaming_fixture.cc',
161             'test/auto_test/fixtures/after_streaming_fixture.h',
162             'test/auto_test/fixtures/before_initialization_fixture.cc',
163             'test/auto_test/fixtures/before_initialization_fixture.h',
164             'test/auto_test/standard/audio_processing_test.cc',
165             'test/auto_test/standard/codec_before_streaming_test.cc',
166             'test/auto_test/standard/codec_test.cc',
167             'test/auto_test/standard/dtmf_test.cc',
168             'test/auto_test/standard/external_media_test.cc',
169             'test/auto_test/standard/file_before_streaming_test.cc',
170             'test/auto_test/standard/file_test.cc',
171             'test/auto_test/standard/hardware_before_initializing_test.cc',
172             'test/auto_test/standard/hardware_before_streaming_test.cc',
173             'test/auto_test/standard/hardware_test.cc',
174             'test/auto_test/standard/mixing_test.cc',
175             'test/auto_test/standard/neteq_stats_test.cc',
176             'test/auto_test/standard/rtp_rtcp_before_streaming_test.cc',
177             'test/auto_test/standard/rtp_rtcp_extensions.cc',
178             'test/auto_test/standard/rtp_rtcp_test.cc',
179             'test/auto_test/standard/voe_base_misc_test.cc',
180             'test/auto_test/standard/video_sync_test.cc',
181             'test/auto_test/standard/volume_test.cc',
182             'test/auto_test/resource_manager.cc',
183             'test/auto_test/voe_cpu_test.cc',
184             'test/auto_test/voe_cpu_test.h',
185             'test/auto_test/voe_standard_test.cc',
186             'test/auto_test/voe_standard_test.h',
187             'test/auto_test/voe_stress_test.cc',
188             'test/auto_test/voe_stress_test.h',
189             'test/auto_test/voe_test_defines.h',
190             'test/auto_test/voe_test_interface.h',
191           ],
192           'conditions': [
193             ['OS=="android"', {
194               # some tests are not supported on android yet, exclude these tests.
195               'sources!': [
196                 'test/auto_test/standard/hardware_before_streaming_test.cc',
197               ],
198             }],
199           ],
200           # Disable warnings to enable Win64 build, issue 1323.
201           'msvs_disabled_warnings': [
202             4267,  # size_t to int truncation.
203           ],
204         },
205         {
206           # command line test that should work on linux/mac/win
207           'target_name': 'voe_cmd_test',
208           'type': 'executable',
209           'dependencies': [
210             'voice_engine',
211             '<(DEPTH)/testing/gtest.gyp:gtest',
212             '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
213             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
214             '<(webrtc_root)/test/test.gyp:channel_transport',
215             '<(webrtc_root)/test/test.gyp:test_support',
216           ],
217           'sources': [
218             'test/cmd_test/voe_cmd_test.cc',
219           ],
220         },
221       ], # targets
222       'conditions': [
223         # TODO(kjellander): Support UseoFMFC on VS2010.
224         # http://code.google.com/p/webrtc/issues/detail?id=709
225         ['OS=="win" and MSVS_VERSION < "2010"', {
226           'targets': [
227             # WinTest - GUI test for Windows
228             {
229               'target_name': 'voe_ui_win_test',
230               'type': 'executable',
231               'dependencies': [
232                 'voice_engine',
233                 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
234                 '<(webrtc_root)/test/test.gyp:test_support',
235               ],
236               'sources': [
237                 'test/win_test/Resource.h',
238                 'test/win_test/WinTest.cc',
239                 'test/win_test/WinTest.h',
240                 'test/win_test/WinTest.rc',
241                 'test/win_test/WinTestDlg.cc',
242                 'test/win_test/WinTestDlg.h',
243                 'test/win_test/res/WinTest.ico',
244                 'test/win_test/res/WinTest.rc2',
245                 'test/win_test/stdafx.cc',
246                 'test/win_test/stdafx.h',
247               ],
248               'configurations': {
249                 'Common_Base': {
250                   'msvs_configuration_attributes': {
251                     'conditions': [
252                       ['component=="shared_library"', {
253                         'UseOfMFC': '2',  # Shared DLL
254                       },{
255                         'UseOfMFC': '1',  # Static
256                       }],
257                     ],
258                   },
259                 },
260               },
261               'msvs_settings': {
262                 'VCLinkerTool': {
263                   'SubSystem': '2',   # Windows
264                 },
265               },
266             },
267           ],  # targets
268         }],
269         # TODO(henrike): remove build_with_chromium==1 when the bots are using
270         # Chromium's buildbots.
271         ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
272           'targets': [
273             {
274               'target_name': 'voice_engine_unittests_apk_target',
275               'type': 'none',
276               'dependencies': [
277                 '<(apk_tests_path):voice_engine_unittests_apk',
278               ],
279             },
280           ],
281         }],
282         ['test_isolation_mode != "noop"', {
283           'targets': [
284             {
285               'target_name': 'voice_engine_unittests_run',
286               'type': 'none',
287               'dependencies': [
288                 'voice_engine_unittests',
289               ],
290               'includes': [
291                 '../build/isolate.gypi',
292                 'voice_engine_unittests.isolate',
293               ],
294               'sources': [
295                 'voice_engine_unittests.isolate',
296               ],
297             },
298             {
299               'target_name': 'voe_auto_test_run',
300               'type': 'none',
301               'dependencies': [
302                 'voe_auto_test',
303               ],
304               'includes': [
305                 '../build/isolate.gypi',
306                 'voe_auto_test.isolate',
307               ],
308               'sources': [
309                 'voe_auto_test.isolate',
310               ],
311             },
312           ],
313         }],
314       ],  # conditions
315     }], # include_tests
316   ], # conditions
317 }