1# Copyright (c) 2012 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 'conditions': [ 10 ['include_tests==1', { 11 'includes': [ 12 'libjingle/xmllite/xmllite_tests.gypi', 13 'libjingle/xmpp/xmpp_tests.gypi', 14 'p2p/p2p_tests.gypi', 15 'sound/sound_tests.gypi', 16 'webrtc_tests.gypi', 17 ], 18 }], 19 ['enable_protobuf==1', { 20 'targets': [ 21 { 22 # This target should only be built if enable_protobuf is defined 23 'target_name': 'rtc_event_log_proto', 24 'type': 'static_library', 25 'sources': ['call/rtc_event_log.proto',], 26 'variables': { 27 'proto_in_dir': 'call', 28 'proto_out_dir': 'webrtc/call', 29 }, 30 'includes': ['build/protoc.gypi'], 31 }, 32 ], 33 }], 34 ['include_tests==1 and enable_protobuf==1', { 35 'targets': [ 36 { 37 'target_name': 'rtc_event_log2rtp_dump', 38 'type': 'executable', 39 'sources': ['call/rtc_event_log2rtp_dump.cc',], 40 'dependencies': [ 41 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags', 42 'rtc_event_log', 43 'rtc_event_log_proto', 44 'test/test.gyp:rtp_test_utils' 45 ], 46 }, 47 ], 48 }], 49 ], 50 'includes': [ 51 'build/common.gypi', 52 'audio/webrtc_audio.gypi', 53 'call/webrtc_call.gypi', 54 'video/webrtc_video.gypi', 55 ], 56 'variables': { 57 'webrtc_all_dependencies': [ 58 'base/base.gyp:*', 59 'sound/sound.gyp:*', 60 'common.gyp:*', 61 'common_audio/common_audio.gyp:*', 62 'common_video/common_video.gyp:*', 63 'modules/modules.gyp:*', 64 'p2p/p2p.gyp:*', 65 'system_wrappers/system_wrappers.gyp:*', 66 'tools/tools.gyp:*', 67 'voice_engine/voice_engine.gyp:*', 68 '<(webrtc_vp8_dir)/vp8.gyp:*', 69 '<(webrtc_vp9_dir)/vp9.gyp:*', 70 ], 71 }, 72 'targets': [ 73 { 74 'target_name': 'webrtc_all', 75 'type': 'none', 76 'dependencies': [ 77 '<@(webrtc_all_dependencies)', 78 'webrtc', 79 ], 80 'conditions': [ 81 ['include_tests==1', { 82 'dependencies': [ 83 'common_video/common_video_unittests.gyp:*', 84 'rtc_unittests', 85 'system_wrappers/system_wrappers_tests.gyp:*', 86 'test/metrics.gyp:*', 87 'test/test.gyp:*', 88 'test/webrtc_test_common.gyp:*', 89 'webrtc_tests', 90 ], 91 }], 92 ], 93 }, 94 { 95 'target_name': 'webrtc', 96 'type': 'static_library', 97 'sources': [ 98 'audio_receive_stream.h', 99 'audio_send_stream.h', 100 'audio_state.h', 101 'call.h', 102 'config.h', 103 'frame_callback.h', 104 'stream.h', 105 'transport.h', 106 'video_receive_stream.h', 107 'video_renderer.h', 108 'video_send_stream.h', 109 110 '<@(webrtc_audio_sources)', 111 '<@(webrtc_call_sources)', 112 '<@(webrtc_video_sources)', 113 ], 114 'dependencies': [ 115 'common.gyp:*', 116 '<@(webrtc_audio_dependencies)', 117 '<@(webrtc_call_dependencies)', 118 '<@(webrtc_video_dependencies)', 119 'rtc_event_log', 120 ], 121 'conditions': [ 122 # TODO(andresp): Chromium should link directly with this and no if 123 # conditions should be needed on webrtc build files. 124 ['build_with_chromium==1', { 125 'dependencies': [ 126 '<(webrtc_root)/modules/modules.gyp:video_capture', 127 '<(webrtc_root)/modules/modules.gyp:video_render', 128 ], 129 }], 130 ], 131 }, 132 { 133 'target_name': 'rtc_event_log', 134 'type': 'static_library', 135 'sources': [ 136 'call/rtc_event_log.cc', 137 'call/rtc_event_log.h', 138 ], 139 'conditions': [ 140 # If enable_protobuf is defined, we want to compile the protobuf 141 # and add rtc_event_log.pb.h and rtc_event_log.pb.cc to the sources. 142 ['enable_protobuf==1', { 143 'dependencies': [ 144 'rtc_event_log_proto', 145 ], 146 'defines': [ 147 'ENABLE_RTC_EVENT_LOG', 148 ], 149 }], 150 ], 151 }, 152 153 ], 154} 155