blob: 2efb0c297e3dc63c851f522fd67f0e642862f6dc [file] [log] [blame]
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +00001# 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.
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +00008{
Henrik Kjellander15583c12016-02-10 10:53:12 +01009 'variables': {
10 'webrtc_all_dependencies': [
11 'base/base.gyp:*',
Henrik Kjellander15583c12016-02-10 10:53:12 +010012 'common.gyp:*',
13 'common_audio/common_audio.gyp:*',
14 'common_video/common_video.gyp:*',
15 'media/media.gyp:*',
16 'modules/modules.gyp:*',
17 'p2p/p2p.gyp:*',
Henrik Kjellander4d689ad2016-04-01 11:14:52 +020018 'pc/pc.gyp:*',
Henrik Kjellander15583c12016-02-10 10:53:12 +010019 'system_wrappers/system_wrappers.gyp:*',
20 'tools/tools.gyp:*',
21 'voice_engine/voice_engine.gyp:*',
22 '<(webrtc_vp8_dir)/vp8.gyp:*',
23 '<(webrtc_vp9_dir)/vp9.gyp:*',
24 ],
25 },
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000026 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010027 ['build_with_chromium==0', {
28 # TODO(kjellander): Move this to webrtc_all_dependencies once all of talk/
29 # has been moved to webrtc/. It can't be processed by Chromium since the
30 # reference to buid/java.gypi is using an absolute path (and includes
31 # entries cannot contain variables).
32 'variables': {
33 'webrtc_all_dependencies': [
34 'api/api.gyp:*',
35 ],
36 },
37 }],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000038 ['include_tests==1', {
39 'includes': [
40 'webrtc_tests.gypi',
41 ],
42 }],
Bjorn Terelius36411852015-07-30 12:45:18 +020043 ['enable_protobuf==1', {
44 'targets': [
45 {
46 # This target should only be built if enable_protobuf is defined
47 'target_name': 'rtc_event_log_proto',
48 'type': 'static_library',
Peter Boström5c389d32015-09-25 13:58:30 +020049 'sources': ['call/rtc_event_log.proto',],
Bjorn Terelius36411852015-07-30 12:45:18 +020050 'variables': {
Peter Boström5c389d32015-09-25 13:58:30 +020051 'proto_in_dir': 'call',
52 'proto_out_dir': 'webrtc/call',
Bjorn Terelius36411852015-07-30 12:45:18 +020053 },
54 'includes': ['build/protoc.gypi'],
55 },
56 ],
57 }],
Ivo Creusene1aa5b52015-09-18 15:41:07 +020058 ['include_tests==1 and enable_protobuf==1', {
59 'targets': [
60 {
61 'target_name': 'rtc_event_log2rtp_dump',
62 'type': 'executable',
Peter Boström5c389d32015-09-25 13:58:30 +020063 'sources': ['call/rtc_event_log2rtp_dump.cc',],
Ivo Creusene1aa5b52015-09-18 15:41:07 +020064 'dependencies': [
65 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
66 'rtc_event_log',
67 'rtc_event_log_proto',
68 'test/test.gyp:rtp_test_utils'
69 ],
70 },
71 ],
72 }],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000073 ],
74 'includes': [
75 'build/common.gypi',
Peter Boström5c389d32015-09-25 13:58:30 +020076 'audio/webrtc_audio.gypi',
77 'call/webrtc_call.gypi',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000078 'video/webrtc_video.gypi',
79 ],
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000080 'targets': [
81 {
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000082 'target_name': 'webrtc_all',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000083 'type': 'none',
84 'dependencies': [
85 '<@(webrtc_all_dependencies)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000086 'webrtc',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000087 ],
88 'conditions': [
89 ['include_tests==1', {
90 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010091 'api/api_tests.gyp:*',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000092 'common_video/common_video_unittests.gyp:*',
Peter Boström2ee24392015-06-22 07:57:16 +020093 'rtc_unittests',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000094 'system_wrappers/system_wrappers_tests.gyp:*',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000095 'test/metrics.gyp:*',
96 'test/test.gyp:*',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000097 'webrtc_tests',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000098 ],
99 }],
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000100 ],
101 },
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000102 {
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000103 'target_name': 'webrtc',
104 'type': 'static_library',
105 'sources': [
kjellander7324eb92016-02-25 08:36:42 -0800106 'audio_receive_stream.h',
Jelena Marusiccd670222015-07-16 09:30:09 +0200107 'audio_send_stream.h',
solenberg566ef242015-11-06 15:34:49 -0800108 'audio_state.h',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000109 'call.h',
kjellander7324eb92016-02-25 08:36:42 -0800110 'config.h',
kjellander7324eb92016-02-25 08:36:42 -0800111 'stream.h',
112 'transport.h',
113 'video_receive_stream.h',
kjellander7324eb92016-02-25 08:36:42 -0800114 'video_send_stream.h',
115
Peter Boström5c389d32015-09-25 13:58:30 +0200116 '<@(webrtc_audio_sources)',
117 '<@(webrtc_call_sources)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000118 '<@(webrtc_video_sources)',
119 ],
120 'dependencies': [
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +0000121 'common.gyp:*',
Peter Boström5c389d32015-09-25 13:58:30 +0200122 '<@(webrtc_audio_dependencies)',
123 '<@(webrtc_call_dependencies)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000124 '<@(webrtc_video_dependencies)',
Bjorn Terelius36411852015-07-30 12:45:18 +0200125 'rtc_event_log',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000126 ],
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000127 'conditions': [
Henrik Kjellander6ffc3302015-10-08 14:40:51 +0200128 # TODO(andresp): Chromium should link directly with this and no if
129 # conditions should be needed on webrtc build files.
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000130 ['build_with_chromium==1', {
pbos@webrtc.orga7f77722014-12-15 16:33:16 +0000131 'dependencies': [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +0000132 '<(webrtc_root)/modules/modules.gyp:video_capture',
133 '<(webrtc_root)/modules/modules.gyp:video_render',
pbos@webrtc.orga7f77722014-12-15 16:33:16 +0000134 ],
135 }],
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000136 ],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000137 },
Bjorn Terelius36411852015-07-30 12:45:18 +0200138 {
139 'target_name': 'rtc_event_log',
140 'type': 'static_library',
141 'sources': [
Peter Boström5c389d32015-09-25 13:58:30 +0200142 'call/rtc_event_log.cc',
143 'call/rtc_event_log.h',
terelius4311ba52016-04-22 12:40:37 -0700144 'call/rtc_event_log_helper_thread.cc',
145 'call/rtc_event_log_helper_thread.h',
Bjorn Terelius36411852015-07-30 12:45:18 +0200146 ],
147 'conditions': [
148 # If enable_protobuf is defined, we want to compile the protobuf
149 # and add rtc_event_log.pb.h and rtc_event_log.pb.cc to the sources.
150 ['enable_protobuf==1', {
151 'dependencies': [
152 'rtc_event_log_proto',
153 ],
154 'defines': [
155 'ENABLE_RTC_EVENT_LOG',
156 ],
157 }],
158 ],
159 },
160
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000161 ],
162}