blob: f9f846b544caf8b9cdb31928b6fb1a965d6946bd [file] [log] [blame]
hjonaa32c3e2015-12-13 19:58:11 -08001# Copyright (c) 2015 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': [ '../build/common.gypi', ],
11 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010012 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
13 'conditions': [
14 ['sysroot!=""', {
15 'variables': {
16 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
17 },
18 }, {
19 'variables': {
20 'pkg-config': 'pkg-config'
21 },
22 }],
23 ],
24 }],
kjellander69b34622016-06-21 01:05:16 -070025 # Excluded from the Chromium build since they cannot be built due to
26 # incompability with Chromium's logging implementation.
27 ['OS=="android" and build_with_chromium==0', {
Henrik Kjellander15583c12016-02-10 10:53:12 +010028 'targets': [
29 {
30 'target_name': 'libjingle_peerconnection_jni',
31 'type': 'static_library',
32 'dependencies': [
sakal86ccd7b2016-08-22 00:26:01 -070033 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
kjellander98bba392016-06-01 05:28:54 -070034 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
Henrik Kjellander15583c12016-02-10 10:53:12 +010035 'libjingle_peerconnection',
36 ],
37 'sources': [
sakald34a7112016-07-01 05:10:51 -070038 'android/jni/androidmediacodeccommon.h',
39 'android/jni/androidmediadecoder_jni.cc',
40 'android/jni/androidmediadecoder_jni.h',
41 'android/jni/androidmediaencoder_jni.cc',
42 'android/jni/androidmediaencoder_jni.h',
43 'android/jni/androidmetrics_jni.cc',
44 'android/jni/androidnetworkmonitor_jni.cc',
45 'android/jni/androidnetworkmonitor_jni.h',
46 'android/jni/androidvideocapturer_jni.cc',
47 'android/jni/androidvideocapturer_jni.h',
Sami Kalliomaki16032122016-07-20 16:13:08 +020048 'android/jni/androidvideotracksource_jni.cc',
sakald34a7112016-07-01 05:10:51 -070049 'android/jni/classreferenceholder.cc',
50 'android/jni/classreferenceholder.h',
51 'android/jni/jni_helpers.cc',
52 'android/jni/jni_helpers.h',
53 'android/jni/native_handle_impl.cc',
54 'android/jni/native_handle_impl.h',
55 'android/jni/peerconnection_jni.cc',
56 'android/jni/surfacetexturehelper_jni.cc',
57 'android/jni/surfacetexturehelper_jni.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010058 'androidvideocapturer.cc',
59 'androidvideocapturer.h',
Sami Kalliomaki16032122016-07-20 16:13:08 +020060 'androidvideotracksource.cc',
61 'androidvideotracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010062 ],
63 'include_dirs': [
64 '<(libyuv_dir)/include',
65 ],
66 # TODO(kjellander): Make the code compile without disabling these flags.
67 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
68 'cflags': [
69 '-Wno-sign-compare',
70 '-Wno-unused-variable',
71 ],
72 'cflags!': [
73 '-Wextra',
74 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010075 'msvs_disabled_warnings': [
76 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
77 4267, # conversion from 'size_t' to 'int', possible loss of data.
78 4389, # signed/unsigned mismatch.
79 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010080 },
81 {
82 'target_name': 'libjingle_peerconnection_so',
83 'type': 'shared_library',
84 'dependencies': [
85 'libjingle_peerconnection',
86 'libjingle_peerconnection_jni',
87 ],
88 'sources': [
sakald34a7112016-07-01 05:10:51 -070089 'android/jni/jni_onload.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010090 ],
91 'variables': {
92 # This library uses native JNI exports; tell GYP so that the
93 # required symbols will be kept.
94 'use_native_jni_exports': 1,
95 },
96 },
Henrik Kjellander15583c12016-02-10 10:53:12 +010097 ]
98 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +010099 ], # conditions
100 'targets': [
101 {
102 'target_name': 'libjingle_peerconnection',
103 'type': 'static_library',
104 'dependencies': [
105 '<(webrtc_root)/media/media.gyp:rtc_media',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100106 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100107 ],
108 'sources': [
109 'audiotrack.cc',
110 'audiotrack.h',
111 'datachannel.cc',
112 'datachannel.h',
113 'datachannelinterface.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100114 'dtmfsender.cc',
115 'dtmfsender.h',
116 'dtmfsenderinterface.h',
117 'jsep.h',
118 'jsepicecandidate.cc',
119 'jsepicecandidate.h',
120 'jsepsessiondescription.cc',
121 'jsepsessiondescription.h',
122 'localaudiosource.cc',
123 'localaudiosource.h',
124 'mediaconstraintsinterface.cc',
125 'mediaconstraintsinterface.h',
126 'mediacontroller.cc',
127 'mediacontroller.h',
128 'mediastream.cc',
129 'mediastream.h',
130 'mediastreaminterface.h',
131 'mediastreamobserver.cc',
132 'mediastreamobserver.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100133 'mediastreamproxy.h',
134 'mediastreamtrack.h',
135 'mediastreamtrackproxy.h',
136 'notifier.h',
137 'peerconnection.cc',
138 'peerconnection.h',
139 'peerconnectionfactory.cc',
140 'peerconnectionfactory.h',
141 'peerconnectionfactoryproxy.h',
142 'peerconnectioninterface.h',
143 'peerconnectionproxy.h',
144 'proxy.h',
145 'remoteaudiosource.cc',
146 'remoteaudiosource.h',
hbos615d3012016-08-24 01:33:13 -0700147 'rtcstats.h',
148 'rtcstatsreport.h',
skvladdc1c62c2016-03-16 19:07:43 -0700149 'rtpparameters.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100150 'rtpreceiver.cc',
151 'rtpreceiver.h',
152 'rtpreceiverinterface.h',
153 'rtpsender.cc',
154 'rtpsender.h',
155 'rtpsenderinterface.h',
156 'sctputils.cc',
157 'sctputils.h',
158 'statscollector.cc',
159 'statscollector.h',
160 'statstypes.cc',
161 'statstypes.h',
162 'streamcollection.h',
perkja3ede6c2016-03-08 01:27:48 +0100163 'videocapturertracksource.cc',
164 'videocapturertracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100165 'videosourceproxy.h',
166 'videotrack.cc',
167 'videotrack.h',
perkj745b2972016-03-08 02:54:58 +0100168 'videotracksource.cc',
169 'videotracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100170 'webrtcsdp.cc',
171 'webrtcsdp.h',
172 'webrtcsession.cc',
173 'webrtcsession.h',
174 'webrtcsessiondescriptionfactory.cc',
175 'webrtcsessiondescriptionfactory.h',
176 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100177 'conditions': [
178 ['clang==1', {
179 'cflags!': [
180 '-Wextra',
181 ],
182 'xcode_settings': {
183 'WARNING_CFLAGS!': ['-Wextra'],
184 },
185 }, {
186 'cflags': [
187 '-Wno-maybe-uninitialized', # Only exists for GCC.
188 ],
189 }],
mikescarlett9bc517f2016-04-29 18:30:55 -0700190 ['use_quic==1', {
191 'dependencies': [
192 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
193 ],
194 'sources': [
195 'quicdatachannel.cc',
196 'quicdatachannel.h',
197 'quicdatatransport.cc',
198 'quicdatatransport.h',
199 ],
200 'export_dependent_settings': [
201 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
202 ],
203 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100204 ],
205 }, # target libjingle_peerconnection
206 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800207}