blob: 377ef8f70be8de9c2db2fed97b353512e74717b9 [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',
32 'libjingle_peerconnection',
33 ],
34 'sources': [
35 'androidvideocapturer.cc',
36 'androidvideocapturer.h',
37 'java/jni/androidmediacodeccommon.h',
38 'java/jni/androidmediadecoder_jni.cc',
39 'java/jni/androidmediadecoder_jni.h',
40 'java/jni/androidmediaencoder_jni.cc',
41 'java/jni/androidmediaencoder_jni.h',
42 'java/jni/androidnetworkmonitor_jni.cc',
43 'java/jni/androidnetworkmonitor_jni.h',
44 'java/jni/androidvideocapturer_jni.cc',
45 'java/jni/androidvideocapturer_jni.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010046 'java/jni/surfacetexturehelper_jni.cc',
47 'java/jni/surfacetexturehelper_jni.h',
48 'java/jni/classreferenceholder.cc',
49 'java/jni/classreferenceholder.h',
50 'java/jni/jni_helpers.cc',
51 'java/jni/jni_helpers.h',
52 'java/jni/native_handle_impl.cc',
53 'java/jni/native_handle_impl.h',
54 'java/jni/peerconnection_jni.cc',
55 ],
56 'include_dirs': [
57 '<(libyuv_dir)/include',
58 ],
59 # TODO(kjellander): Make the code compile without disabling these flags.
60 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
61 'cflags': [
62 '-Wno-sign-compare',
63 '-Wno-unused-variable',
64 ],
65 'cflags!': [
66 '-Wextra',
67 ],
68 'cflags_cc!': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010069 '-Woverloaded-virtual',
70 ],
71 'msvs_disabled_warnings': [
72 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
73 4267, # conversion from 'size_t' to 'int', possible loss of data.
74 4389, # signed/unsigned mismatch.
75 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010076 },
77 {
78 'target_name': 'libjingle_peerconnection_so',
79 'type': 'shared_library',
80 'dependencies': [
81 'libjingle_peerconnection',
82 'libjingle_peerconnection_jni',
83 ],
84 'sources': [
85 'java/jni/jni_onload.cc',
86 ],
87 'variables': {
88 # This library uses native JNI exports; tell GYP so that the
89 # required symbols will be kept.
90 'use_native_jni_exports': 1,
91 },
92 },
93 {
94 # |libjingle_peerconnection_java| builds a jar file with name
95 # libjingle_peerconnection_java.jar using Chrome's build system.
96 # It includes all Java files needed to setup a PeeerConnection call
97 # from Android.
98 'target_name': 'libjingle_peerconnection_java',
99 'type': 'none',
100 'dependencies': [
101 'libjingle_peerconnection_so',
102 ],
103 'variables': {
104 # Designate as Chromium code and point to our lint settings to
105 # enable linting of the WebRTC code (this is the only way to make
106 # lint_action invoke the Android linter).
107 'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
108 'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
109 'chromium_code': 1,
110 'java_in_dir': 'java',
111 'webrtc_base_dir': '<(webrtc_root)/base',
112 'webrtc_modules_dir': '<(webrtc_root)/modules',
113 'additional_src_dirs' : [
114 'java/android',
115 '<(webrtc_base_dir)/java/src',
116 '<(webrtc_modules_dir)/audio_device/android/java/src',
nisseb99395a2016-04-29 00:58:42 -0700117
Henrik Kjellander15583c12016-02-10 10:53:12 +0100118 ],
119 },
120 'includes': ['../../build/java.gypi'],
121 }, # libjingle_peerconnection_java
122 ]
123 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100124 ], # conditions
125 'targets': [
126 {
127 'target_name': 'libjingle_peerconnection',
128 'type': 'static_library',
129 'dependencies': [
130 '<(webrtc_root)/media/media.gyp:rtc_media',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100131 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100132 ],
133 'sources': [
134 'audiotrack.cc',
135 'audiotrack.h',
136 'datachannel.cc',
137 'datachannel.h',
138 'datachannelinterface.h',
139 'dtlsidentitystore.cc',
140 'dtlsidentitystore.h',
141 'dtmfsender.cc',
142 'dtmfsender.h',
143 'dtmfsenderinterface.h',
144 'jsep.h',
145 'jsepicecandidate.cc',
146 'jsepicecandidate.h',
147 'jsepsessiondescription.cc',
148 'jsepsessiondescription.h',
149 'localaudiosource.cc',
150 'localaudiosource.h',
151 'mediaconstraintsinterface.cc',
152 'mediaconstraintsinterface.h',
153 'mediacontroller.cc',
154 'mediacontroller.h',
155 'mediastream.cc',
156 'mediastream.h',
157 'mediastreaminterface.h',
158 'mediastreamobserver.cc',
159 'mediastreamobserver.h',
160 'mediastreamprovider.h',
161 'mediastreamproxy.h',
162 'mediastreamtrack.h',
163 'mediastreamtrackproxy.h',
164 'notifier.h',
165 'peerconnection.cc',
166 'peerconnection.h',
167 'peerconnectionfactory.cc',
168 'peerconnectionfactory.h',
169 'peerconnectionfactoryproxy.h',
170 'peerconnectioninterface.h',
171 'peerconnectionproxy.h',
172 'proxy.h',
173 'remoteaudiosource.cc',
174 'remoteaudiosource.h',
skvladdc1c62c2016-03-16 19:07:43 -0700175 'rtpparameters.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100176 'rtpreceiver.cc',
177 'rtpreceiver.h',
178 'rtpreceiverinterface.h',
179 'rtpsender.cc',
180 'rtpsender.h',
181 'rtpsenderinterface.h',
182 'sctputils.cc',
183 'sctputils.h',
184 'statscollector.cc',
185 'statscollector.h',
186 'statstypes.cc',
187 'statstypes.h',
188 'streamcollection.h',
perkja3ede6c2016-03-08 01:27:48 +0100189 'videocapturertracksource.cc',
190 'videocapturertracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100191 'videosourceproxy.h',
192 'videotrack.cc',
193 'videotrack.h',
perkj745b2972016-03-08 02:54:58 +0100194 'videotracksource.cc',
195 'videotracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100196 'webrtcsdp.cc',
197 'webrtcsdp.h',
198 'webrtcsession.cc',
199 'webrtcsession.h',
200 'webrtcsessiondescriptionfactory.cc',
201 'webrtcsessiondescriptionfactory.h',
202 ],
203 # TODO(kjellander): Make the code compile without disabling these flags.
204 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
205 'cflags': [
206 '-Wno-sign-compare',
207 ],
208 'cflags_cc!': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100209 '-Woverloaded-virtual',
210 ],
211 'conditions': [
212 ['clang==1', {
213 'cflags!': [
214 '-Wextra',
215 ],
216 'xcode_settings': {
217 'WARNING_CFLAGS!': ['-Wextra'],
218 },
219 }, {
220 'cflags': [
221 '-Wno-maybe-uninitialized', # Only exists for GCC.
222 ],
223 }],
224 ['OS=="win"', {
225 # Disable warning for signed/unsigned mismatch.
226 'msvs_settings': {
227 'VCCLCompilerTool': {
228 'AdditionalOptions!': ['/we4389'],
229 },
230 },
231 }],
232 ['OS=="win" and clang==1', {
233 'msvs_settings': {
234 'VCCLCompilerTool': {
235 'AdditionalOptions': [
236 '-Wno-sign-compare',
237 ],
238 },
239 },
240 }],
mikescarlett9bc517f2016-04-29 18:30:55 -0700241 ['use_quic==1', {
242 'dependencies': [
243 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
244 ],
245 'sources': [
246 'quicdatachannel.cc',
247 'quicdatachannel.h',
248 'quicdatatransport.cc',
249 'quicdatatransport.h',
250 ],
251 'export_dependent_settings': [
252 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
253 ],
254 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100255 ],
256 }, # target libjingle_peerconnection
257 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800258}