• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2013 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  'includes': [
10    '../build/common.gypi',
11  ],
12  'targets': [
13    {
14      'target_name': 'webrtc_test_common',
15      'type': 'static_library',
16      'sources': [
17        'call_test.cc',
18        'call_test.h',
19        'configurable_frame_size_encoder.cc',
20        'configurable_frame_size_encoder.h',
21        'constants.cc',
22        'constants.h',
23        'direct_transport.cc',
24        'direct_transport.h',
25        'encoder_settings.cc',
26        'encoder_settings.h',
27        'fake_audio_device.cc',
28        'fake_audio_device.h',
29        'fake_decoder.cc',
30        'fake_decoder.h',
31        'fake_encoder.cc',
32        'fake_encoder.h',
33        'fake_network_pipe.cc',
34        'fake_network_pipe.h',
35        'frame_generator_capturer.cc',
36        'frame_generator_capturer.h',
37        'layer_filtering_transport.cc',
38        'layer_filtering_transport.h',
39        'mock_transport.h',
40        'mock_voe_channel_proxy.h',
41        'mock_voice_engine.h',
42        'null_transport.cc',
43        'null_transport.h',
44        'rtp_rtcp_observer.h',
45        'run_loop.cc',
46        'run_loop.h',
47        'statistics.cc',
48        'statistics.h',
49        'vcm_capturer.cc',
50        'vcm_capturer.h',
51        'video_capturer.cc',
52        'video_capturer.h',
53        'win/run_loop_win.cc',
54      ],
55      'conditions': [
56        ['OS=="win"', {
57          'sources!': [
58            'run_loop.cc',
59          ],
60        }],
61      ],
62      'dependencies': [
63        '<(DEPTH)/testing/gmock.gyp:gmock',
64        '<(DEPTH)/testing/gtest.gyp:gtest',
65        '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
66        '<(webrtc_root)/base/base.gyp:rtc_base',
67        '<(webrtc_root)/common.gyp:webrtc_common',
68        '<(webrtc_root)/modules/modules.gyp:media_file',
69        '<(webrtc_root)/modules/modules.gyp:video_render',
70        '<(webrtc_root)/test/test.gyp:fake_video_frames',
71        '<(webrtc_root)/test/test.gyp:test_support',
72        '<(webrtc_root)/test/test.gyp:rtp_test_utils',
73        '<(webrtc_root)/webrtc.gyp:webrtc',
74      ],
75    },
76    {
77      'target_name': 'webrtc_test_renderer',
78      'type': 'static_library',
79      'sources': [
80        'gl/gl_renderer.cc',
81        'gl/gl_renderer.h',
82        'linux/glx_renderer.cc',
83        'linux/glx_renderer.h',
84        'linux/video_renderer_linux.cc',
85        'mac/video_renderer_mac.h',
86        'mac/video_renderer_mac.mm',
87        'null_platform_renderer.cc',
88        'video_renderer.cc',
89        'video_renderer.h',
90        'win/d3d_renderer.cc',
91        'win/d3d_renderer.h',
92      ],
93      'conditions': [
94        ['OS=="linux"', {
95          'sources!': [
96            'null_platform_renderer.cc',
97          ],
98        }],
99        ['OS=="mac"', {
100          'sources!': [
101            'null_platform_renderer.cc',
102          ],
103        }],
104        ['OS!="linux" and OS!="mac"', {
105          'sources!' : [
106            'gl/gl_renderer.cc',
107            'gl/gl_renderer.h',
108          ],
109        }],
110        ['OS=="win"', {
111          'sources!': [
112            'null_platform_renderer.cc',
113          ],
114          'include_dirs': [
115            '<(directx_sdk_path)/Include',
116          ],
117        }],
118        ['OS=="win" and clang==1', {
119          'msvs_settings': {
120            'VCCLCompilerTool': {
121              'AdditionalOptions': [
122                # Disable warnings failing when compiling with Clang on Windows.
123                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
124                '-Wno-bool-conversion',
125                '-Wno-comment',
126                '-Wno-delete-non-virtual-dtor',
127              ],
128            },
129          },
130        }],
131      ],
132      'dependencies': [
133        '<(DEPTH)/testing/gtest.gyp:gtest',
134        '<(webrtc_root)/modules/modules.gyp:media_file',
135        '<(webrtc_root)/test/test.gyp:fake_video_frames',
136        '<(webrtc_root)/test/test.gyp:test_support',
137      ],
138      'direct_dependent_settings': {
139        'conditions': [
140          ['OS=="linux"', {
141            'libraries': [
142              '-lXext',
143              '-lX11',
144              '-lGL',
145            ],
146          }],
147          ['OS=="android"', {
148            'libraries' : [
149              '-lGLESv2', '-llog',
150            ],
151          }],
152          ['OS=="mac"', {
153            'xcode_settings' : {
154              'OTHER_LDFLAGS' : [
155                '-framework Cocoa',
156                '-framework OpenGL',
157                '-framework CoreVideo',
158              ],
159            },
160          }],
161        ],
162      },
163    },
164  ],
165  'conditions': [
166    ['include_tests==1', {
167      'targets': [
168        {
169          'target_name': 'webrtc_test_common_unittests',
170          'type': '<(gtest_target_type)',
171          'dependencies': [
172            'webrtc_test_common',
173            '<(DEPTH)/testing/gtest.gyp:gtest',
174            '<(DEPTH)/testing/gmock.gyp:gmock',
175            '<(webrtc_root)/modules/modules.gyp:video_capture',
176            '<(webrtc_root)/test/test.gyp:test_support_main',
177          ],
178          'sources': [
179            'fake_network_pipe_unittest.cc',
180            'frame_generator_unittest.cc',
181            'rtp_file_reader_unittest.cc',
182            'rtp_file_writer_unittest.cc',
183          ],
184        },
185      ],  #targets
186    }],  # include_tests
187  ],  # conditions
188}
189