blob: d483f24a53d952749fb0b2a9965471af046ee555 [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
29 # Include the iLBC audio codec?
30 ['build_with_chromium==1 or build_with_mozilla==1', {
31 'include_ilbc%': 0,
32 }, {
33 'include_ilbc%': 1,
34 }],
35
henrike@webrtc.org42581542013-07-16 16:37:22 +000036 ['build_with_chromium==1', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000037 'webrtc_root%': '<(DEPTH)/third_party/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000038 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000039 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000040 }, {
41 'webrtc_root%': '<(DEPTH)/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000042 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000043 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000044 }],
45 ],
46 },
47 'build_with_chromium%': '<(build_with_chromium)',
kwibergf8c2bac2016-01-18 06:38:32 -080048 'build_with_mozilla%': '<(build_with_mozilla)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000049 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000050 'apk_tests_path%': '<(apk_tests_path)',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000051 'modules_java_gyp_path%': '<(modules_java_gyp_path)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000052 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
marpan@webrtc.org5b883172014-11-01 06:10:48 +000053 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9',
kwiberg0edb05b2016-01-19 05:54:28 -080054 'include_ilbc%': '<(include_ilbc)',
55 'include_opus%': '<(include_opus)',
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +000056 'opus_dir%': '<(DEPTH)/third_party/opus',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000057 },
58 'build_with_chromium%': '<(build_with_chromium)',
kwiberg98ab3a42015-09-30 21:54:21 -070059 'build_with_mozilla%': '<(build_with_mozilla)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000060 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000061 'apk_tests_path%': '<(apk_tests_path)',
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)',
henrike@webrtc.orgd72a7592014-09-02 15:41:12 +000067 '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,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000103 'build_libvpx%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200104 'build_libyuv%': 1,
andrew@webrtc.orgd2c09dd2015-03-11 22:06:55 +0000105 'build_openmax_dl%': 1,
minyue@webrtc.org7c112f32015-03-17 14:04:56 +0000106 'build_opus%': 1,
kjellander292e1922016-01-13 05:46:58 -0800107 'build_protobuf%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200108 'build_ssl%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000109
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000110 # Disable by default
111 'have_dbus_glib%': 0,
112
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000113 # Make it possible to provide custom locations for some libraries.
kjellanderd6024e32015-09-28 21:16:48 -0700114 'libvpx_dir%': '<(DEPTH)/third_party/libvpx_new',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000115 'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000116 'opus_dir%': '<(opus_dir)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000117
henrika@webrtc.org45db7ee2015-01-12 14:27:23 +0000118 # Use Java based audio layer as default for Android.
119 # Change this setting to 1 to use Open SL audio instead.
120 # TODO(henrika): add support for Open SL ES.
121 'enable_android_opensl%': 0,
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000122
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000123 # Link-Time Optimizations
124 # Executes code generation at link-time instead of compile-time
125 # https://gcc.gnu.org/wiki/LinkTimeOptimization
126 'use_lto%': 0,
127
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000128 # Defer ssl perference to that specified through sslconfig.h instead of
129 # choosing openssl or nss directly. In practice, this can be used to
130 # enable schannel on windows.
131 'use_legacy_ssl_defaults%': 0,
132
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700133 # Determines whether NEON code will be built.
134 'build_with_neon%': 0,
135
Zeke Chin71f6f442015-06-29 14:34:58 -0700136 # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections.
137 # Enabling this may break interop with Android clients that support H264.
138 'use_objc_h264%': 0,
139
hbos902c03e2016-01-21 03:34:40 -0800140 # Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
141 # all platforms except iOS. Because FFmpeg can be built with/without H.264
142 # support, |ffmpeg_branding| has to separately be set to a value that
143 # includes H.264, for example "Chrome". If FFmpeg is built without H.264,
144 # compilation succeeds but |H264DecoderImpl| fails to initialize.
hbosa9a1d2a2016-01-11 10:19:02 -0800145 # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
146 # http://www.openh264.org, https://www.ffmpeg.org/
hbos902c03e2016-01-21 03:34:40 -0800147 'rtc_use_h264%': 0, # TODO(hbos): enc/dec in follow up CL(s).
hbosa9a1d2a2016-01-11 10:19:02 -0800148
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000149 'conditions': [
150 ['build_with_chromium==1', {
151 # Exclude pulse audio on Chromium since its prerequisites don't require
152 # pulse audio.
153 'include_pulse_audio%': 0,
154
155 # Exclude internal ADM since Chromium uses its own IO handling.
156 'include_internal_audio_device%': 0,
kjellander@webrtc.orgf22695c2015-11-19 15:39:29 +0100157
158 # Remove tests for Chromium to avoid slowing down GYP generation.
159 'include_tests%': 0,
160 'restrict_webrtc_logging%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000161 }, { # Settings for the standalone (not-in-Chromium) build.
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000162 # TODO(andrew): For now, disable the Chrome plugins, which causes a
163 # flood of chromium-style warnings. Investigate enabling them:
164 # http://code.google.com/p/webrtc/issues/detail?id=163
165 'clang_use_chrome_plugins%': 0,
166
henrike@webrtc.org42581542013-07-16 16:37:22 +0000167 'include_pulse_audio%': 1,
168 'include_internal_audio_device%': 1,
henrike@webrtc.org42581542013-07-16 16:37:22 +0000169 'include_tests%': 1,
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000170 'restrict_webrtc_logging%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000171 }],
172 ['OS=="ios"', {
fischman@webrtc.orgd0f4c212013-08-20 22:16:55 +0000173 'build_libjpeg%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000174 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000175 ['target_arch=="arm" or target_arch=="arm64"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000176 'prefer_fixed_point%': 1,
177 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700178 ['(target_arch=="arm" and (arm_neon==1 or arm_neon_optional==1)) or target_arch=="arm64"', {
179 'build_with_neon%': 1,
180 }],
andrew@webrtc.org34ac9562014-12-30 18:19:56 +0000181 ['OS!="ios" and (target_arch!="arm" or arm_version>=7) and target_arch!="mips64el"', {
andrew@webrtc.org4165f7a2014-10-08 18:01:27 +0000182 'rtc_use_openmax_dl%': 1,
183 }, {
184 'rtc_use_openmax_dl%': 0,
185 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000186 ], # conditions
187 },
188 'target_defaults': {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000189 'conditions': [
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000190 ['restrict_webrtc_logging==1', {
191 'defines': ['WEBRTC_RESTRICT_LOGGING',],
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000192 }],
tina.legrand@webrtc.org1f8c02a2012-10-25 12:37:08 +0000193 ['build_with_mozilla==1', {
194 'defines': [
195 # Changes settings for Mozilla build.
196 'WEBRTC_MOZILLA_BUILD',
197 ],
198 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000199 ['have_dbus_glib==1', {
200 'defines': [
201 'HAVE_DBUS_GLIB',
202 ],
203 'cflags': [
204 '<!@(pkg-config --cflags dbus-glib-1)',
205 ],
206 }],
henrike@webrtc.orgd72a7592014-09-02 15:41:12 +0000207 ['rtc_relative_path==1', {
208 'defines': ['EXPAT_RELATIVE_PATH',],
209 }],
tommi@webrtc.orga32f0642015-03-08 07:38:31 +0000210 ['os_posix==1', {
211 'configurations': {
212 'Debug_Base': {
213 'defines': [
214 # Chromium's build/common.gypi defines _DEBUG for all posix
215 # _except_ for ios & mac. The size of data types such as
216 # pthread_mutex_t varies between release and debug builds
217 # and is controlled via this flag. Since we now share code
218 # between base/base.gyp and build/common.gypi (this file),
219 # both gyp(i) files, must consistently set this flag uniformly
220 # or else we'll run in to hard-to-figure-out problems where
221 # one compilation unit uses code from another but expects
222 # differently laid out types.
223 # For WebRTC, we want it there as well, because ASSERT and
224 # friends trigger off of it.
225 '_DEBUG',
226 ],
227 },
228 },
229 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000230 ['build_with_chromium==1', {
231 'defines': [
232 # Changes settings for Chromium build.
233 'WEBRTC_CHROMIUM_BUILD',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000234 'LOGGING_INSIDE_WEBRTC',
235 ],
236 'include_dirs': [
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000237 # Include the top-level directory when building in Chrome, so we can
238 # use full paths (e.g. headers inside testing/ or third_party/).
239 '<(DEPTH)',
240 # The overrides must be included before the WebRTC root as that's the
241 # mechanism for selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700242 '../../webrtc_overrides',
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000243 # The WebRTC root is needed to allow includes in the WebRTC code base
244 # to be prefixed with webrtc/.
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000245 '../..',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000246 ],
247 }, {
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000248 # Include the top-level dir so the WebRTC code can use full paths.
249 'include_dirs': [
250 '../..',
251 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000252 'conditions': [
253 ['os_posix==1', {
solenberg@webrtc.orgc6db88b2014-06-04 17:15:42 +0000254 'conditions': [
255 # -Wextra is currently disabled in Chromium's common.gypi. Enable
256 # for targets that can handle it. For Android/arm64 right now
257 # there will be an 'enumeral and non-enumeral type in conditional
258 # expression' warning in android_tools/ndk_experimental's version
259 # of stlport.
260 # See: https://code.google.com/p/chromium/issues/detail?id=379699
261 ['target_arch!="arm64" or OS!="android"', {
262 'cflags': [
263 '-Wextra',
264 # We need to repeat some flags from Chromium's common.gypi
265 # here that get overridden by -Wextra.
266 '-Wno-unused-parameter',
267 '-Wno-missing-field-initializers',
268 '-Wno-strict-overflow',
269 ],
270 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000271 ],
272 'cflags_cc': [
pbos@webrtc.orgb3cc78d2013-11-21 11:42:02 +0000273 '-Wnon-virtual-dtor',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000274 # This is enabled for clang; enable for gcc as well.
275 '-Woverloaded-virtual',
276 ],
277 }],
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000278 ['clang==1', {
279 'cflags': [
kjellander@webrtc.org7d2b6a92015-01-28 18:37:58 +0000280 '-Wimplicit-fallthrough',
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000281 '-Wthread-safety',
282 ],
283 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000284 ],
285 }],
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000286 ['target_arch=="arm64"', {
287 'defines': [
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700288 'WEBRTC_ARCH_ARM64',
289 'WEBRTC_HAS_NEON',
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000290 ],
291 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000292 ['target_arch=="arm"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000293 'defines': [
294 'WEBRTC_ARCH_ARM',
295 ],
296 'conditions': [
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000297 ['arm_version>=7', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000298 'defines': ['WEBRTC_ARCH_ARM_V7',],
299 'conditions': [
300 ['arm_neon==1', {
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700301 'defines': ['WEBRTC_HAS_NEON',],
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000302 }],
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700303 ['arm_neon==0 and arm_neon_optional==1', {
304 'defines': ['WEBRTC_DETECT_NEON',],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000305 }],
306 ],
307 }],
308 ],
309 }],
Richard Colesd417c932015-04-09 17:36:12 +0200310 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000311 'defines': [
312 'MIPS32_LE',
313 ],
314 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000315 ['mips_float_abi=="hard"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000316 'defines': [
317 'MIPS_FPU_LE',
318 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000319 }],
andrew@webrtc.orgd05756f2014-09-30 15:53:24 +0000320 ['mips_arch_variant=="r2"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000321 'defines': [
322 'MIPS32_R2_LE',
323 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000324 }],
325 ['mips_dsp_rev==1', {
326 'defines': [
327 'MIPS_DSP_R1_LE',
328 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000329 }],
330 ['mips_dsp_rev==2', {
331 'defines': [
332 'MIPS_DSP_R1_LE',
333 'MIPS_DSP_R2_LE',
334 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000335 }],
336 ],
337 }],
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +0000338 ['coverage==1 and OS=="linux"', {
339 'cflags': [ '-ftest-coverage',
340 '-fprofile-arcs' ],
341 'link_settings': { 'libraries': [ '-lgcov' ] },
342 }],
henrike@webrtc.orgcc08e3f2014-03-07 15:30:21 +0000343 ['os_posix==1', {
344 # For access to standard POSIXish features, use WEBRTC_POSIX instead of
345 # a more specific macro.
346 'defines': [
347 'WEBRTC_POSIX',
348 ],
349 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000350 ['OS=="ios"', {
351 'defines': [
352 'WEBRTC_MAC',
353 'WEBRTC_IOS',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000354 ],
355 }],
Zeke Chin71f6f442015-06-29 14:34:58 -0700356 ['OS=="ios" and use_objc_h264==1', {
357 'defines': [
358 'WEBRTC_OBJC_H264',
359 ],
360 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000361 ['OS=="linux"', {
362 'defines': [
363 'WEBRTC_LINUX',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000364 ],
365 }],
366 ['OS=="mac"', {
367 'defines': [
368 'WEBRTC_MAC',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000369 ],
370 }],
371 ['OS=="win"', {
372 'defines': [
373 'WEBRTC_WIN',
374 ],
375 # TODO(andrew): enable all warnings when possible.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000376 # TODO(phoglund): get rid of 4373 supression when
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000377 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000378 'msvs_disabled_warnings': [
379 4373, # legacy warning for ignoring const / volatile in signatures.
380 4389, # Signed/unsigned mismatch.
381 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000382 # Re-enable some warnings that Chromium disables.
383 'msvs_disabled_warnings!': [4189,],
384 }],
385 ['OS=="android"', {
386 'defines': [
387 'WEBRTC_LINUX',
388 'WEBRTC_ANDROID',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000389 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000390 'conditions': [
Henrik Kjellanderc0c7d2e2015-09-07 12:57:42 +0200391 ['clang==0', {
Henrik Kjellander5bfc6cb2015-09-21 16:50:45 +0200392 # The Android NDK doesn't provide optimized versions of these
393 # functions. Ensure they are disabled for all compilers.
wjia@webrtc.orgb1193692013-01-12 01:52:07 +0000394 'cflags': [
395 '-fno-builtin-cos',
396 '-fno-builtin-sin',
397 '-fno-builtin-cosf',
398 '-fno-builtin-sinf',
399 ],
400 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000401 ],
402 }],
Tommi931e6582015-05-20 09:44:38 +0200403 ['include_internal_audio_device==1', {
404 'defines': [
405 'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE',
406 ],
407 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000408 ], # conditions
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000409 'direct_dependent_settings': {
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000410 'conditions': [
411 ['build_with_mozilla==1', {
412 'defines': [
413 # Changes settings for Mozilla build.
414 'WEBRTC_MOZILLA_BUILD',
415 ],
416 }],
417 ['build_with_chromium==1', {
418 'defines': [
419 # Changes settings for Chromium build.
420 'WEBRTC_CHROMIUM_BUILD',
421 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000422 'include_dirs': [
henrikgee2bf412015-09-30 03:48:52 -0700423 # The overrides must be included first as that is the mechanism for
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000424 # selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700425 '../../webrtc_overrides',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000426 '../..',
427 ],
428 }, {
429 'include_dirs': [
430 '../..',
431 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000432 }],
433 ['OS=="mac"', {
434 'defines': [
435 'WEBRTC_MAC',
436 ],
437 }],
438 ['OS=="ios"', {
439 'defines': [
440 'WEBRTC_MAC',
441 'WEBRTC_IOS',
442 ],
443 }],
444 ['OS=="win"', {
445 'defines': [
446 'WEBRTC_WIN',
447 ],
448 }],
449 ['OS=="linux"', {
450 'defines': [
451 'WEBRTC_LINUX',
452 ],
453 }],
454 ['OS=="android"', {
455 'defines': [
456 'WEBRTC_LINUX',
457 'WEBRTC_ANDROID',
458 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000459 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000460 ['os_posix==1', {
461 # For access to standard POSIXish features, use WEBRTC_POSIX instead
462 # of a more specific macro.
463 'defines': [
464 'WEBRTC_POSIX',
465 ],
466 }],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000467 ],
468 },
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000469 }, # target_defaults
470}
471