blob: f8446d9f91bce9e16aa52cd9dfc5df9ae293007e [file] [log] [blame]
andrew@webrtc.org14b43be2012-10-22 18:19:23 +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.
8
9# This file contains common settings for building WebRTC components.
10
11{
12 # Nesting is required in order to use variables for setting other variables.
13 'variables': {
14 'variables': {
15 'variables': {
16 'variables': {
henrike@webrtc.org7ef7df52014-01-21 15:54:56 +000017 # This will already be set to zero by supplement.gypi
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000018 'build_with_chromium%': 1,
kwiberg0edb05b2016-01-19 05:54:28 -080019
20 # Enable to use the Mozilla internal settings.
21 'build_with_mozilla%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000022 },
23 'build_with_chromium%': '<(build_with_chromium)',
kwiberg0edb05b2016-01-19 05:54:28 -080024 'build_with_mozilla%': '<(build_with_mozilla%)',
25 'include_opus%': 1,
kwibergf8c2bac2016-01-18 06:38:32 -080026
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000027 'conditions': [
kwiberg0edb05b2016-01-19 05:54:28 -080028 # Include the iLBC audio codec?
29 ['build_with_chromium==1 or build_with_mozilla==1', {
30 'include_ilbc%': 0,
31 }, {
32 'include_ilbc%': 1,
33 }],
34
henrike@webrtc.org42581542013-07-16 16:37:22 +000035 ['build_with_chromium==1', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000036 'webrtc_root%': '<(DEPTH)/third_party/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000037 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000038 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000039 }, {
40 'webrtc_root%': '<(DEPTH)/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000041 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000042 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000043 }],
44 ],
45 },
46 'build_with_chromium%': '<(build_with_chromium)',
kwibergf8c2bac2016-01-18 06:38:32 -080047 'build_with_mozilla%': '<(build_with_mozilla)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000048 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000049 'apk_tests_path%': '<(apk_tests_path)',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000050 'modules_java_gyp_path%': '<(modules_java_gyp_path)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000051 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
marpan@webrtc.org5b883172014-11-01 06:10:48 +000052 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9',
kwiberg0edb05b2016-01-19 05:54:28 -080053 'include_ilbc%': '<(include_ilbc)',
54 'include_opus%': '<(include_opus)',
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +000055 'opus_dir%': '<(DEPTH)/third_party/opus',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000056 },
57 'build_with_chromium%': '<(build_with_chromium)',
kwiberg98ab3a42015-09-30 21:54:21 -070058 'build_with_mozilla%': '<(build_with_mozilla)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000059 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000060 'apk_tests_path%': '<(apk_tests_path)',
agrieve39530c42016-04-07 08:18:34 -070061 'test_runner_path': '<(DEPTH)/webrtc/build/android/test_runner.py',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000062 'modules_java_gyp_path%': '<(modules_java_gyp_path)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000063 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
marpan@webrtc.org5b883172014-11-01 06:10:48 +000064 'webrtc_vp9_dir%': '<(webrtc_vp9_dir)',
kwibergf8c2bac2016-01-18 06:38:32 -080065 'include_ilbc%': '<(include_ilbc)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000066 'include_opus%': '<(include_opus)',
phoglundc6c00b32016-05-04 01:54:35 -070067 'rtc_relative_path%': 1,
henrike@webrtc.org9f36c082014-06-16 21:35:20 +000068 'external_libraries%': '0',
69 'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/',
70 # openssl needs to be defined or gyp will complain. Is is only used when
71 # when providing external libraries so just use current directory as a
72 # placeholder.
73 'ssl_root%': '.',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000074
75 # The Chromium common.gypi we use treats all gyp files without
76 # chromium_code==1 as third party code. This disables many of the
77 # preferred warning settings.
78 #
79 # We can set this here to have WebRTC code treated as Chromium code. Our
80 # third party code will still have the reduced warning settings.
81 'chromium_code': 1,
82
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +000083 # Set to 1 to enable code coverage on Linux using the gcov library.
84 'coverage%': 0,
85
solenberg@webrtc.orgd6e46632013-10-30 16:06:26 +000086 # Remote bitrate estimator logging/plotting.
87 'enable_bwe_test_logging%': 0,
88
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000089 # Selects fixed-point code where possible.
90 'prefer_fixed_point%': 0,
91
92 # Enable data logging. Produces text files with data logged within engines
93 # which can be easily parsed for offline processing.
94 'enable_data_logging%': 0,
95
andrew@webrtc.orgf9825e52013-05-20 21:18:04 +000096 # Enables the use of protocol buffers for debug recordings.
97 'enable_protobuf%': 1,
98
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000099 # Disable these to not build components which can be externally provided.
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200100 'build_expat%': 1,
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000101 'build_json%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000102 'build_libjpeg%': 1,
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100103 'build_libsrtp%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000104 'build_libvpx%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200105 'build_libyuv%': 1,
andrew@webrtc.orgd2c09dd2015-03-11 22:06:55 +0000106 'build_openmax_dl%': 1,
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000107 'build_opus%': 1,
kjellander292e1922016-01-13 05:46:58 -0800108 'build_protobuf%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200109 'build_ssl%': 1,
kjellandera96e2d72016-02-04 23:52:28 -0800110 'build_usrsctp%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000111
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000112 # Disable by default
113 'have_dbus_glib%': 0,
114
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000115 # Make it possible to provide custom locations for some libraries.
kjellandere26e7872016-03-04 14:39:28 -0800116 'libvpx_dir%': '<(DEPTH)/third_party/libvpx',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000117 'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000118 'opus_dir%': '<(opus_dir)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000119
henrika@webrtc.org45db7ee2015-01-12 14:27:23 +0000120 # Use Java based audio layer as default for Android.
121 # Change this setting to 1 to use Open SL audio instead.
122 # TODO(henrika): add support for Open SL ES.
123 'enable_android_opensl%': 0,
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000124
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000125 # Link-Time Optimizations
126 # Executes code generation at link-time instead of compile-time
127 # https://gcc.gnu.org/wiki/LinkTimeOptimization
128 'use_lto%': 0,
129
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000130 # Defer ssl perference to that specified through sslconfig.h instead of
131 # choosing openssl or nss directly. In practice, this can be used to
132 # enable schannel on windows.
133 'use_legacy_ssl_defaults%': 0,
134
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700135 # Determines whether NEON code will be built.
136 'build_with_neon%': 0,
137
Henrik Kjellander15583c12016-02-10 10:53:12 +0100138 # Disable this to skip building source requiring GTK.
139 'use_gtk%': 1,
140
Zeke Chin71f6f442015-06-29 14:34:58 -0700141 # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections.
142 # Enabling this may break interop with Android clients that support H264.
143 'use_objc_h264%': 0,
144
tkchin1bd95532016-03-23 13:19:18 -0700145 # Enable this to prevent extern symbols from being hidden on iOS builds.
146 # The chromium settings we inherit hide symbols by default on Release
147 # builds. We want our symbols to be visible when distributing WebRTC via
148 # static libraries to avoid linker warnings.
149 'ios_override_visibility%': 0,
150
mikescarlettcd0e4752016-02-08 17:35:47 -0800151 # Determines whether QUIC code will be built.
152 'use_quic%': 0,
153
hbosa81f6a32016-02-07 15:05:22 -0800154 'conditions': [
hbos62756ee2016-02-08 02:57:00 -0800155 # Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported
156 # on all platforms except Android and iOS. Because FFmpeg can be built
157 # with/without H.264 support, |ffmpeg_branding| has to separately be set
158 # to a value that includes H.264, for example "Chrome". If FFmpeg is built
159 # without H.264, compilation succeeds but |H264DecoderImpl| fails to
160 # initialize. See also: |rtc_initialize_ffmpeg|.
161 # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
162 # http://www.openh264.org, https://www.ffmpeg.org/
163 ['proprietary_codecs==1 and OS!="android" and OS!="ios"', {
164 'rtc_use_h264%': 1,
165 }, {
166 'rtc_use_h264%': 0,
167 }],
168
hbosc5a39c22016-02-02 02:26:05 -0800169 # FFmpeg must be initialized for |H264DecoderImpl| to work. This can be
170 # done by WebRTC during |H264DecoderImpl::InitDecode| or externally.
171 # FFmpeg must only be initialized once. Projects that initialize FFmpeg
172 # externally, such as Chromium, must turn this flag off so that WebRTC
173 # does not also initialize.
174 ['build_with_chromium==0', {
175 'rtc_initialize_ffmpeg%': 1,
176 }, {
177 'rtc_initialize_ffmpeg%': 0,
178 }],
179
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000180 ['build_with_chromium==1', {
kjellander1c24a6d2016-02-05 13:10:34 -0800181 # Build sources requiring GTK. NOTICE: This is not present in Chrome OS
182 # build environments, even if available for Chromium builds.
183 'use_gtk%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000184 # Exclude pulse audio on Chromium since its prerequisites don't require
185 # pulse audio.
186 'include_pulse_audio%': 0,
187
188 # Exclude internal ADM since Chromium uses its own IO handling.
189 'include_internal_audio_device%': 0,
kjellander@webrtc.orgf22695c2015-11-19 15:39:29 +0100190
191 # Remove tests for Chromium to avoid slowing down GYP generation.
192 'include_tests%': 0,
193 'restrict_webrtc_logging%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000194 }, { # Settings for the standalone (not-in-Chromium) build.
kjellander1c24a6d2016-02-05 13:10:34 -0800195 'use_gtk%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000196 # TODO(andrew): For now, disable the Chrome plugins, which causes a
197 # flood of chromium-style warnings. Investigate enabling them:
198 # http://code.google.com/p/webrtc/issues/detail?id=163
199 'clang_use_chrome_plugins%': 0,
200
henrike@webrtc.org42581542013-07-16 16:37:22 +0000201 'include_pulse_audio%': 1,
202 'include_internal_audio_device%': 1,
henrike@webrtc.org42581542013-07-16 16:37:22 +0000203 'include_tests%': 1,
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000204 'restrict_webrtc_logging%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000205 }],
206 ['OS=="ios"', {
fischman@webrtc.orgd0f4c212013-08-20 22:16:55 +0000207 'build_libjpeg%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000208 }],
peahc8da45f2016-03-03 01:28:49 -0800209 ['target_arch=="arm" or target_arch=="arm64" or target_arch=="mipsel"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000210 'prefer_fixed_point%': 1,
211 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700212 ['(target_arch=="arm" and (arm_neon==1 or arm_neon_optional==1)) or target_arch=="arm64"', {
213 'build_with_neon%': 1,
214 }],
andrew@webrtc.org34ac9562014-12-30 18:19:56 +0000215 ['OS!="ios" and (target_arch!="arm" or arm_version>=7) and target_arch!="mips64el"', {
andrew@webrtc.org4165f7a2014-10-08 18:01:27 +0000216 'rtc_use_openmax_dl%': 1,
217 }, {
218 'rtc_use_openmax_dl%': 0,
219 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000220 ], # conditions
221 },
222 'target_defaults': {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000223 'conditions': [
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000224 ['restrict_webrtc_logging==1', {
225 'defines': ['WEBRTC_RESTRICT_LOGGING',],
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000226 }],
tina.legrand@webrtc.org1f8c02a2012-10-25 12:37:08 +0000227 ['build_with_mozilla==1', {
228 'defines': [
229 # Changes settings for Mozilla build.
230 'WEBRTC_MOZILLA_BUILD',
231 ],
232 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000233 ['have_dbus_glib==1', {
234 'defines': [
235 'HAVE_DBUS_GLIB',
236 ],
237 'cflags': [
238 '<!@(pkg-config --cflags dbus-glib-1)',
239 ],
240 }],
phoglundc6c00b32016-05-04 01:54:35 -0700241 ['rtc_relative_path==1', {
242 'defines': ['EXPAT_RELATIVE_PATH',],
243 }],
tommi@webrtc.orga32f0642015-03-08 07:38:31 +0000244 ['os_posix==1', {
245 'configurations': {
246 'Debug_Base': {
247 'defines': [
248 # Chromium's build/common.gypi defines _DEBUG for all posix
249 # _except_ for ios & mac. The size of data types such as
250 # pthread_mutex_t varies between release and debug builds
251 # and is controlled via this flag. Since we now share code
252 # between base/base.gyp and build/common.gypi (this file),
253 # both gyp(i) files, must consistently set this flag uniformly
254 # or else we'll run in to hard-to-figure-out problems where
255 # one compilation unit uses code from another but expects
256 # differently laid out types.
257 # For WebRTC, we want it there as well, because ASSERT and
258 # friends trigger off of it.
259 '_DEBUG',
260 ],
261 },
262 },
263 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000264 ['build_with_chromium==1', {
265 'defines': [
266 # Changes settings for Chromium build.
kjellander@webrtc.org9266cc02016-04-04 09:12:59 +0200267 'WEBRTC_CHROMIUM_BUILD',
kjellander602f41e2016-04-04 23:39:45 -0700268 'LOGGING_INSIDE_WEBRTC',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000269 ],
270 'include_dirs': [
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000271 # Include the top-level directory when building in Chrome, so we can
272 # use full paths (e.g. headers inside testing/ or third_party/).
273 '<(DEPTH)',
274 # The overrides must be included before the WebRTC root as that's the
275 # mechanism for selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700276 '../../webrtc_overrides',
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000277 # The WebRTC root is needed to allow includes in the WebRTC code base
278 # to be prefixed with webrtc/.
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000279 '../..',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000280 ],
281 }, {
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000282 # Include the top-level dir so the WebRTC code can use full paths.
283 'include_dirs': [
284 '../..',
285 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000286 'conditions': [
287 ['os_posix==1', {
solenberg@webrtc.orgc6db88b2014-06-04 17:15:42 +0000288 'conditions': [
289 # -Wextra is currently disabled in Chromium's common.gypi. Enable
290 # for targets that can handle it. For Android/arm64 right now
291 # there will be an 'enumeral and non-enumeral type in conditional
292 # expression' warning in android_tools/ndk_experimental's version
293 # of stlport.
294 # See: https://code.google.com/p/chromium/issues/detail?id=379699
295 ['target_arch!="arm64" or OS!="android"', {
296 'cflags': [
297 '-Wextra',
298 # We need to repeat some flags from Chromium's common.gypi
299 # here that get overridden by -Wextra.
300 '-Wno-unused-parameter',
301 '-Wno-missing-field-initializers',
302 '-Wno-strict-overflow',
303 ],
304 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000305 ],
306 'cflags_cc': [
pbos@webrtc.orgb3cc78d2013-11-21 11:42:02 +0000307 '-Wnon-virtual-dtor',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000308 # This is enabled for clang; enable for gcc as well.
309 '-Woverloaded-virtual',
310 ],
311 }],
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000312 ['clang==1', {
313 'cflags': [
kjellander@webrtc.org7d2b6a92015-01-28 18:37:58 +0000314 '-Wimplicit-fallthrough',
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000315 '-Wthread-safety',
316 ],
317 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000318 ],
319 }],
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000320 ['target_arch=="arm64"', {
321 'defines': [
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700322 'WEBRTC_ARCH_ARM64',
323 'WEBRTC_HAS_NEON',
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000324 ],
325 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000326 ['target_arch=="arm"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000327 'defines': [
328 'WEBRTC_ARCH_ARM',
329 ],
330 'conditions': [
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000331 ['arm_version>=7', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000332 'defines': ['WEBRTC_ARCH_ARM_V7',],
333 'conditions': [
334 ['arm_neon==1', {
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700335 'defines': ['WEBRTC_HAS_NEON',],
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000336 }],
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700337 ['arm_neon==0 and arm_neon_optional==1', {
338 'defines': ['WEBRTC_DETECT_NEON',],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000339 }],
340 ],
341 }],
342 ],
343 }],
Richard Colesd417c932015-04-09 17:36:12 +0200344 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000345 'defines': [
346 'MIPS32_LE',
347 ],
348 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000349 ['mips_float_abi=="hard"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000350 'defines': [
351 'MIPS_FPU_LE',
352 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000353 }],
andrew@webrtc.orgd05756f2014-09-30 15:53:24 +0000354 ['mips_arch_variant=="r2"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000355 'defines': [
356 'MIPS32_R2_LE',
357 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000358 }],
359 ['mips_dsp_rev==1', {
360 'defines': [
361 'MIPS_DSP_R1_LE',
362 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000363 }],
364 ['mips_dsp_rev==2', {
365 'defines': [
366 'MIPS_DSP_R1_LE',
367 'MIPS_DSP_R2_LE',
368 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000369 }],
370 ],
371 }],
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +0000372 ['coverage==1 and OS=="linux"', {
373 'cflags': [ '-ftest-coverage',
374 '-fprofile-arcs' ],
kjellander6e6941f2016-04-18 23:08:09 -0700375 'ldflags': [ '--coverage' ],
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +0000376 'link_settings': { 'libraries': [ '-lgcov' ] },
377 }],
henrike@webrtc.orgcc08e3f2014-03-07 15:30:21 +0000378 ['os_posix==1', {
379 # For access to standard POSIXish features, use WEBRTC_POSIX instead of
380 # a more specific macro.
381 'defines': [
382 'WEBRTC_POSIX',
383 ],
384 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000385 ['OS=="ios"', {
386 'defines': [
387 'WEBRTC_MAC',
388 'WEBRTC_IOS',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000389 ],
390 }],
tkchin1bd95532016-03-23 13:19:18 -0700391 ['OS=="ios" and ios_override_visibility==1', {
392 'xcode_settings': {
393 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO',
394 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
395 }
396 }],
Zeke Chin71f6f442015-06-29 14:34:58 -0700397 ['OS=="ios" and use_objc_h264==1', {
398 'defines': [
399 'WEBRTC_OBJC_H264',
400 ],
401 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000402 ['OS=="linux"', {
403 'defines': [
404 'WEBRTC_LINUX',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000405 ],
406 }],
407 ['OS=="mac"', {
408 'defines': [
409 'WEBRTC_MAC',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000410 ],
411 }],
412 ['OS=="win"', {
413 'defines': [
414 'WEBRTC_WIN',
415 ],
416 # TODO(andrew): enable all warnings when possible.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000417 # TODO(phoglund): get rid of 4373 supression when
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000418 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000419 'msvs_disabled_warnings': [
420 4373, # legacy warning for ignoring const / volatile in signatures.
421 4389, # Signed/unsigned mismatch.
422 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000423 # Re-enable some warnings that Chromium disables.
424 'msvs_disabled_warnings!': [4189,],
425 }],
426 ['OS=="android"', {
427 'defines': [
428 'WEBRTC_LINUX',
429 'WEBRTC_ANDROID',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000430 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000431 'conditions': [
Henrik Kjellanderc0c7d2e2015-09-07 12:57:42 +0200432 ['clang==0', {
Henrik Kjellander5bfc6cb2015-09-21 16:50:45 +0200433 # The Android NDK doesn't provide optimized versions of these
434 # functions. Ensure they are disabled for all compilers.
wjia@webrtc.orgb1193692013-01-12 01:52:07 +0000435 'cflags': [
436 '-fno-builtin-cos',
437 '-fno-builtin-sin',
438 '-fno-builtin-cosf',
439 '-fno-builtin-sinf',
440 ],
441 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000442 ],
443 }],
Tommi931e6582015-05-20 09:44:38 +0200444 ['include_internal_audio_device==1', {
445 'defines': [
446 'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE',
447 ],
448 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000449 ], # conditions
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000450 'direct_dependent_settings': {
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000451 'conditions': [
452 ['build_with_mozilla==1', {
453 'defines': [
454 # Changes settings for Mozilla build.
455 'WEBRTC_MOZILLA_BUILD',
456 ],
457 }],
458 ['build_with_chromium==1', {
459 'defines': [
460 # Changes settings for Chromium build.
461 'WEBRTC_CHROMIUM_BUILD',
462 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000463 'include_dirs': [
henrikgee2bf412015-09-30 03:48:52 -0700464 # The overrides must be included first as that is the mechanism for
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000465 # selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700466 '../../webrtc_overrides',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000467 '../..',
468 ],
469 }, {
470 'include_dirs': [
471 '../..',
472 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000473 }],
474 ['OS=="mac"', {
475 'defines': [
476 'WEBRTC_MAC',
477 ],
478 }],
479 ['OS=="ios"', {
480 'defines': [
481 'WEBRTC_MAC',
482 'WEBRTC_IOS',
483 ],
484 }],
485 ['OS=="win"', {
486 'defines': [
487 'WEBRTC_WIN',
488 ],
489 }],
490 ['OS=="linux"', {
491 'defines': [
492 'WEBRTC_LINUX',
493 ],
494 }],
495 ['OS=="android"', {
496 'defines': [
497 'WEBRTC_LINUX',
498 'WEBRTC_ANDROID',
499 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000500 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000501 ['os_posix==1', {
502 # For access to standard POSIXish features, use WEBRTC_POSIX instead
503 # of a more specific macro.
504 'defines': [
505 'WEBRTC_POSIX',
506 ],
507 }],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000508 ],
509 },
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000510 }, # target_defaults
511}