blob: 0341741e725dda0287a0bfa2d37d9640cb63aab5 [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!': [
69 '-Wnon-virtual-dtor',
70 '-Woverloaded-virtual',
71 ],
72 'msvs_disabled_warnings': [
73 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
74 4267, # conversion from 'size_t' to 'int', possible loss of data.
75 4389, # signed/unsigned mismatch.
76 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010077 },
78 {
79 'target_name': 'libjingle_peerconnection_so',
80 'type': 'shared_library',
81 'dependencies': [
82 'libjingle_peerconnection',
83 'libjingle_peerconnection_jni',
84 ],
85 'sources': [
86 'java/jni/jni_onload.cc',
87 ],
88 'variables': {
89 # This library uses native JNI exports; tell GYP so that the
90 # required symbols will be kept.
91 'use_native_jni_exports': 1,
92 },
93 },
94 {
95 # |libjingle_peerconnection_java| builds a jar file with name
96 # libjingle_peerconnection_java.jar using Chrome's build system.
97 # It includes all Java files needed to setup a PeeerConnection call
98 # from Android.
99 'target_name': 'libjingle_peerconnection_java',
100 'type': 'none',
101 'dependencies': [
102 'libjingle_peerconnection_so',
103 ],
104 'variables': {
105 # Designate as Chromium code and point to our lint settings to
106 # enable linting of the WebRTC code (this is the only way to make
107 # lint_action invoke the Android linter).
108 'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
109 'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
110 'chromium_code': 1,
111 'java_in_dir': 'java',
112 'webrtc_base_dir': '<(webrtc_root)/base',
113 'webrtc_modules_dir': '<(webrtc_root)/modules',
114 'additional_src_dirs' : [
115 'java/android',
116 '<(webrtc_base_dir)/java/src',
117 '<(webrtc_modules_dir)/audio_device/android/java/src',
kjellander01903672016-04-27 08:56:50 -0700118 '<(webrtc_modules_dir)/video_render/android/java/src',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100119 ],
120 },
121 'includes': ['../../build/java.gypi'],
122 }, # libjingle_peerconnection_java
123 ]
124 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100125 ], # conditions
126 'targets': [
127 {
128 'target_name': 'libjingle_peerconnection',
129 'type': 'static_library',
130 'dependencies': [
131 '<(webrtc_root)/media/media.gyp:rtc_media',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100132 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100133 ],
134 'sources': [
135 'audiotrack.cc',
136 'audiotrack.h',
137 'datachannel.cc',
138 'datachannel.h',
139 'datachannelinterface.h',
140 'dtlsidentitystore.cc',
141 'dtlsidentitystore.h',
142 'dtmfsender.cc',
143 'dtmfsender.h',
144 'dtmfsenderinterface.h',
145 'jsep.h',
146 'jsepicecandidate.cc',
147 'jsepicecandidate.h',
148 'jsepsessiondescription.cc',
149 'jsepsessiondescription.h',
150 'localaudiosource.cc',
151 'localaudiosource.h',
152 'mediaconstraintsinterface.cc',
153 'mediaconstraintsinterface.h',
154 'mediacontroller.cc',
155 'mediacontroller.h',
156 'mediastream.cc',
157 'mediastream.h',
158 'mediastreaminterface.h',
159 'mediastreamobserver.cc',
160 'mediastreamobserver.h',
161 'mediastreamprovider.h',
162 'mediastreamproxy.h',
163 'mediastreamtrack.h',
164 'mediastreamtrackproxy.h',
165 'notifier.h',
166 'peerconnection.cc',
167 'peerconnection.h',
168 'peerconnectionfactory.cc',
169 'peerconnectionfactory.h',
170 'peerconnectionfactoryproxy.h',
171 'peerconnectioninterface.h',
172 'peerconnectionproxy.h',
173 'proxy.h',
174 'remoteaudiosource.cc',
175 'remoteaudiosource.h',
skvladdc1c62c2016-03-16 19:07:43 -0700176 'rtpparameters.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100177 'rtpreceiver.cc',
178 'rtpreceiver.h',
179 'rtpreceiverinterface.h',
180 'rtpsender.cc',
181 'rtpsender.h',
182 'rtpsenderinterface.h',
183 'sctputils.cc',
184 'sctputils.h',
185 'statscollector.cc',
186 'statscollector.h',
187 'statstypes.cc',
188 'statstypes.h',
189 'streamcollection.h',
perkja3ede6c2016-03-08 01:27:48 +0100190 'videocapturertracksource.cc',
191 'videocapturertracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100192 'videosourceproxy.h',
193 'videotrack.cc',
194 'videotrack.h',
perkj745b2972016-03-08 02:54:58 +0100195 'videotracksource.cc',
196 'videotracksource.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100197 'webrtcsdp.cc',
198 'webrtcsdp.h',
199 'webrtcsession.cc',
200 'webrtcsession.h',
201 'webrtcsessiondescriptionfactory.cc',
202 'webrtcsessiondescriptionfactory.h',
203 ],
204 # TODO(kjellander): Make the code compile without disabling these flags.
205 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
206 'cflags': [
207 '-Wno-sign-compare',
208 ],
209 'cflags_cc!': [
210 '-Wnon-virtual-dtor',
211 '-Woverloaded-virtual',
212 ],
213 'conditions': [
214 ['clang==1', {
215 'cflags!': [
216 '-Wextra',
217 ],
218 'xcode_settings': {
219 'WARNING_CFLAGS!': ['-Wextra'],
220 },
221 }, {
222 'cflags': [
223 '-Wno-maybe-uninitialized', # Only exists for GCC.
224 ],
225 }],
226 ['OS=="win"', {
227 # Disable warning for signed/unsigned mismatch.
228 'msvs_settings': {
229 'VCCLCompilerTool': {
230 'AdditionalOptions!': ['/we4389'],
231 },
232 },
233 }],
234 ['OS=="win" and clang==1', {
235 'msvs_settings': {
236 'VCCLCompilerTool': {
237 'AdditionalOptions': [
238 '-Wno-sign-compare',
239 ],
240 },
241 },
242 }],
243 ],
244 }, # target libjingle_peerconnection
245 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800246}