blob: 21387448effbd40e994c454a58c6ae46ffab7c31 [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 }],
tkchin9eeb6242016-04-27 01:54:20 -070038 ['build_with_chromium==0 and'
39 '(OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7"))', {
40 # TODO(kjellander): Move this to webrtc_all_dependencies once all of talk/
41 # has been moved to webrtc/. It can't be processed by Chromium since the
42 # reference to buid/java.gypi is using an absolute path (and includes
43 # entries cannot contain variables).
44 'variables': {
45 'webrtc_all_dependencies': [
46 'sdk/sdk.gyp:*',
47 ],
48 },
49 }],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000050 ['include_tests==1', {
51 'includes': [
52 'webrtc_tests.gypi',
53 ],
54 }],
Bjorn Terelius36411852015-07-30 12:45:18 +020055 ['enable_protobuf==1', {
56 'targets': [
57 {
58 # This target should only be built if enable_protobuf is defined
59 'target_name': 'rtc_event_log_proto',
60 'type': 'static_library',
Peter Boström5c389d32015-09-25 13:58:30 +020061 'sources': ['call/rtc_event_log.proto',],
Bjorn Terelius36411852015-07-30 12:45:18 +020062 'variables': {
Peter Boström5c389d32015-09-25 13:58:30 +020063 'proto_in_dir': 'call',
64 'proto_out_dir': 'webrtc/call',
Bjorn Terelius36411852015-07-30 12:45:18 +020065 },
66 'includes': ['build/protoc.gypi'],
67 },
68 ],
69 }],
Ivo Creusene1aa5b52015-09-18 15:41:07 +020070 ['include_tests==1 and enable_protobuf==1', {
71 'targets': [
72 {
73 'target_name': 'rtc_event_log2rtp_dump',
74 'type': 'executable',
Peter Boström5c389d32015-09-25 13:58:30 +020075 'sources': ['call/rtc_event_log2rtp_dump.cc',],
Ivo Creusene1aa5b52015-09-18 15:41:07 +020076 'dependencies': [
77 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
78 'rtc_event_log',
79 'rtc_event_log_proto',
80 'test/test.gyp:rtp_test_utils'
81 ],
82 },
83 ],
84 }],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000085 ],
86 'includes': [
87 'build/common.gypi',
Peter Boström5c389d32015-09-25 13:58:30 +020088 'audio/webrtc_audio.gypi',
89 'call/webrtc_call.gypi',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000090 'video/webrtc_video.gypi',
91 ],
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000092 'targets': [
93 {
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000094 'target_name': 'webrtc_all',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000095 'type': 'none',
96 'dependencies': [
97 '<@(webrtc_all_dependencies)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000098 'webrtc',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +000099 ],
100 'conditions': [
101 ['include_tests==1', {
102 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100103 'api/api_tests.gyp:*',
pbos@webrtc.org724947b2013-12-11 16:26:16 +0000104 'common_video/common_video_unittests.gyp:*',
Peter Boström2ee24392015-06-22 07:57:16 +0200105 'rtc_unittests',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +0000106 'system_wrappers/system_wrappers_tests.gyp:*',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000107 'test/metrics.gyp:*',
108 'test/test.gyp:*',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000109 'webrtc_tests',
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000110 ],
111 }],
tkchin9eeb6242016-04-27 01:54:20 -0700112 ['include_tests==1 and'
113 '(OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7"))', {
114 'dependencies': [
115 'sdk/sdk_tests.gyp:*',
116 ],
117 }],
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000118 ],
119 },
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000120 {
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000121 'target_name': 'webrtc',
122 'type': 'static_library',
123 'sources': [
kjellander7324eb92016-02-25 08:36:42 -0800124 'audio_receive_stream.h',
Jelena Marusiccd670222015-07-16 09:30:09 +0200125 'audio_send_stream.h',
solenberg566ef242015-11-06 15:34:49 -0800126 'audio_state.h',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000127 'call.h',
kjellander7324eb92016-02-25 08:36:42 -0800128 'config.h',
kjellander7324eb92016-02-25 08:36:42 -0800129 'transport.h',
130 'video_receive_stream.h',
kjellander7324eb92016-02-25 08:36:42 -0800131 'video_send_stream.h',
132
Peter Boström5c389d32015-09-25 13:58:30 +0200133 '<@(webrtc_audio_sources)',
134 '<@(webrtc_call_sources)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000135 '<@(webrtc_video_sources)',
136 ],
137 'dependencies': [
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +0000138 'common.gyp:*',
Peter Boström5c389d32015-09-25 13:58:30 +0200139 '<@(webrtc_audio_dependencies)',
140 '<@(webrtc_call_dependencies)',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000141 '<@(webrtc_video_dependencies)',
Bjorn Terelius36411852015-07-30 12:45:18 +0200142 'rtc_event_log',
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000143 ],
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000144 'conditions': [
Henrik Kjellander6ffc3302015-10-08 14:40:51 +0200145 # TODO(andresp): Chromium should link directly with this and no if
146 # conditions should be needed on webrtc build files.
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000147 ['build_with_chromium==1', {
pbos@webrtc.orga7f77722014-12-15 16:33:16 +0000148 'dependencies': [
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00 +0000149 '<(webrtc_root)/modules/modules.gyp:video_capture',
pbos@webrtc.orga7f77722014-12-15 16:33:16 +0000150 ],
151 }],
andresp@webrtc.orgab071da2014-09-18 08:58:15 +0000152 ],
pbos@webrtc.org16e03b72013-10-28 16:32:01 +0000153 },
Bjorn Terelius36411852015-07-30 12:45:18 +0200154 {
155 'target_name': 'rtc_event_log',
156 'type': 'static_library',
157 'sources': [
Peter Boström5c389d32015-09-25 13:58:30 +0200158 'call/rtc_event_log.cc',
159 'call/rtc_event_log.h',
terelius4311ba52016-04-22 12:40:37 -0700160 'call/rtc_event_log_helper_thread.cc',
161 'call/rtc_event_log_helper_thread.h',
Bjorn Terelius36411852015-07-30 12:45:18 +0200162 ],
163 'conditions': [
164 # If enable_protobuf is defined, we want to compile the protobuf
165 # and add rtc_event_log.pb.h and rtc_event_log.pb.cc to the sources.
166 ['enable_protobuf==1', {
167 'dependencies': [
168 'rtc_event_log_proto',
169 ],
170 'defines': [
171 'ENABLE_RTC_EVENT_LOG',
172 ],
173 }],
174 ],
175 },
176
henrike@webrtc.org8d27a1c2013-07-23 18:15:11 +0000177 ],
178}