blob: a3113abf21004148788d7b49d7b58e9368c65b6e [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 }],
25 ['OS=="android"', {
26 'targets': [
27 {
28 'target_name': 'libjingle_peerconnection_jni',
29 'type': 'static_library',
30 'dependencies': [
31 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
kjellander98bba392016-06-01 05:28:54 -070032 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
Henrik Kjellander15583c12016-02-10 10:53:12 +010033 'libjingle_peerconnection',
34 ],
35 'sources': [
36 'androidvideocapturer.cc',
37 'androidvideocapturer.h',
38 'java/jni/androidmediacodeccommon.h',
39 'java/jni/androidmediadecoder_jni.cc',
40 'java/jni/androidmediadecoder_jni.h',
41 'java/jni/androidmediaencoder_jni.cc',
42 'java/jni/androidmediaencoder_jni.h',
asaperssonb432b262016-05-23 06:49:36 -070043 'java/jni/androidmetrics_jni.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010044 'java/jni/androidnetworkmonitor_jni.cc',
45 'java/jni/androidnetworkmonitor_jni.h',
46 'java/jni/androidvideocapturer_jni.cc',
47 'java/jni/androidvideocapturer_jni.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010048 'java/jni/surfacetexturehelper_jni.cc',
49 'java/jni/surfacetexturehelper_jni.h',
50 'java/jni/classreferenceholder.cc',
51 'java/jni/classreferenceholder.h',
52 'java/jni/jni_helpers.cc',
53 'java/jni/jni_helpers.h',
54 'java/jni/native_handle_impl.cc',
55 'java/jni/native_handle_impl.h',
56 'java/jni/peerconnection_jni.cc',
57 ],
58 'include_dirs': [
59 '<(libyuv_dir)/include',
60 ],
61 # TODO(kjellander): Make the code compile without disabling these flags.
62 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
63 'cflags': [
64 '-Wno-sign-compare',
65 '-Wno-unused-variable',
66 ],
67 'cflags!': [
68 '-Wextra',
69 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010070 'msvs_disabled_warnings': [
71 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
72 4267, # conversion from 'size_t' to 'int', possible loss of data.
73 4389, # signed/unsigned mismatch.
74 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010075 },
76 {
77 'target_name': 'libjingle_peerconnection_so',
78 'type': 'shared_library',
79 'dependencies': [
80 'libjingle_peerconnection',
81 'libjingle_peerconnection_jni',
82 ],
83 'sources': [
84 'java/jni/jni_onload.cc',
85 ],
86 'variables': {
87 # This library uses native JNI exports; tell GYP so that the
88 # required symbols will be kept.
89 'use_native_jni_exports': 1,
90 },
91 },
Henrik Kjellander15583c12016-02-10 10:53:12 +010092 ]
93 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +010094 ], # conditions
95 'targets': [
96 {
97 'target_name': 'libjingle_peerconnection',
98 'type': 'static_library',
99 'dependencies': [
100 '<(webrtc_root)/media/media.gyp:rtc_media',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100101 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100102 ],
103 'sources': [
104 'audiotrack.cc',
105 'audiotrack.h',
106 'datachannel.cc',
107 'datachannel.h',
108 'datachannelinterface.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100109 'dtlsidentitystore.h',
110 'dtmfsender.cc',
111 'dtmfsender.h',
112 'dtmfsenderinterface.h',
113 'jsep.h',
114 'jsepicecandidate.cc',
115 'jsepicecandidate.h',
116 'jsepsessiondescription.cc',
117 'jsepsessiondescription.h',
118 'localaudiosource.cc',
119 'localaudiosource.h',
120 'mediaconstraintsinterface.cc',
121 'mediaconstraintsinterface.h',
122 'mediacontroller.cc',
123 'mediacontroller.h',
124 'mediastream.cc',
125 'mediastream.h',
126 'mediastreaminterface.h',
127 'mediastreamobserver.cc',
128 'mediastreamobserver.h',
129 'mediastreamprovider.h',
130 'mediastreamproxy.h',
131 'mediastreamtrack.h',
132 'mediastreamtrackproxy.h',
133 'notifier.h',
134 'peerconnection.cc',
135 'peerconnection.h',
136 'peerconnectionfactory.cc',
137 'peerconnectionfactory.h',
138 'peerconnectionfactoryproxy.h',
139 'peerconnectioninterface.h',
140 'peerconnectionproxy.h',
141 'proxy.h',
142 'remoteaudiosource.cc',
143 'remoteaudiosource.h',
skvladdc1c62c2016-03-16 19:07:43 -0700144 'rtpparameters.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100145 'rtpreceiver.cc',
146 'rtpreceiver.h',
147 'rtpreceiverinterface.h',
148 'rtpsender.cc',
149 'rtpsender.h',
150 'rtpsenderinterface.h',
151 'sctputils.cc',
152 'sctputils.h',
153 'statscollector.cc',
154 'statscollector.h',
155 'statstypes.cc',
156 'statstypes.h',
157 'streamcollection.h',
perkja3ede6c2016-03-08 01:27:48 +0100158 'videocapturertracksource.cc',
159 'videocapturertracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100160 'videosourceproxy.h',
161 'videotrack.cc',
162 'videotrack.h',
perkj745b2972016-03-08 02:54:58 +0100163 'videotracksource.cc',
164 'videotracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100165 'webrtcsdp.cc',
166 'webrtcsdp.h',
167 'webrtcsession.cc',
168 'webrtcsession.h',
169 'webrtcsessiondescriptionfactory.cc',
170 'webrtcsessiondescriptionfactory.h',
171 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100172 'conditions': [
173 ['clang==1', {
174 'cflags!': [
175 '-Wextra',
176 ],
177 'xcode_settings': {
178 'WARNING_CFLAGS!': ['-Wextra'],
179 },
180 }, {
181 'cflags': [
182 '-Wno-maybe-uninitialized', # Only exists for GCC.
183 ],
184 }],
mikescarlett9bc517f2016-04-29 18:30:55 -0700185 ['use_quic==1', {
186 'dependencies': [
187 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
188 ],
189 'sources': [
190 'quicdatachannel.cc',
191 'quicdatachannel.h',
192 'quicdatatransport.cc',
193 'quicdatatransport.h',
194 ],
195 'export_dependent_settings': [
196 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
197 ],
198 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100199 ],
200 }, # target libjingle_peerconnection
201 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800202}