blob: 2b0516863ecf712e464aa789465707ab323bb636 [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,
19 },
20 'build_with_chromium%': '<(build_with_chromium)',
21
22 'conditions': [
henrike@webrtc.org42581542013-07-16 16:37:22 +000023 ['build_with_chromium==1', {
24 'build_with_libjingle': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000025 'webrtc_root%': '<(DEPTH)/third_party/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000026 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000027 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000028 }, {
henrike@webrtc.org42581542013-07-16 16:37:22 +000029 'build_with_libjingle%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000030 'webrtc_root%': '<(DEPTH)/webrtc',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000031 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000032 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000033 }],
34 ],
35 },
36 'build_with_chromium%': '<(build_with_chromium)',
fischman@webrtc.orgf61e02c2013-02-20 23:13:46 +000037 'build_with_libjingle%': '<(build_with_libjingle)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000038 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000039 'apk_tests_path%': '<(apk_tests_path)',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000040 'modules_java_gyp_path%': '<(modules_java_gyp_path)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000041 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
marpan@webrtc.org5b883172014-11-01 06:10:48 +000042 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9',
leozwang@webrtc.org6f19b1b2012-10-27 17:46:55 +000043 'include_opus%': 1,
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +000044 'opus_dir%': '<(DEPTH)/third_party/opus',
kwiberg98ab3a42015-09-30 21:54:21 -070045
46 # Enable to use the Mozilla internal settings.
47 'build_with_mozilla%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000048 },
49 'build_with_chromium%': '<(build_with_chromium)',
fischman@webrtc.orgf61e02c2013-02-20 23:13:46 +000050 'build_with_libjingle%': '<(build_with_libjingle)',
kwiberg98ab3a42015-09-30 21:54:21 -070051 'build_with_mozilla%': '<(build_with_mozilla)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000052 'webrtc_root%': '<(webrtc_root)',
kjellander@webrtc.org0372b932014-09-03 14:34:46 +000053 'apk_tests_path%': '<(apk_tests_path)',
henrike@webrtc.orga2073af2013-07-08 18:14:58 +000054 'modules_java_gyp_path%': '<(modules_java_gyp_path)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000055 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
marpan@webrtc.org5b883172014-11-01 06:10:48 +000056 'webrtc_vp9_dir%': '<(webrtc_vp9_dir)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000057 'include_opus%': '<(include_opus)',
henrike@webrtc.orgd72a7592014-09-02 15:41:12 +000058 'rtc_relative_path%': 1,
henrike@webrtc.org9f36c082014-06-16 21:35:20 +000059 'external_libraries%': '0',
60 'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/',
61 # openssl needs to be defined or gyp will complain. Is is only used when
62 # when providing external libraries so just use current directory as a
63 # placeholder.
64 'ssl_root%': '.',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000065
66 # The Chromium common.gypi we use treats all gyp files without
67 # chromium_code==1 as third party code. This disables many of the
68 # preferred warning settings.
69 #
70 # We can set this here to have WebRTC code treated as Chromium code. Our
71 # third party code will still have the reduced warning settings.
72 'chromium_code': 1,
73
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +000074 # Set to 1 to enable code coverage on Linux using the gcov library.
75 'coverage%': 0,
76
solenberg@webrtc.orgd6e46632013-10-30 16:06:26 +000077 # Remote bitrate estimator logging/plotting.
78 'enable_bwe_test_logging%': 0,
79
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000080 # Selects fixed-point code where possible.
81 'prefer_fixed_point%': 0,
82
83 # Enable data logging. Produces text files with data logged within engines
84 # which can be easily parsed for offline processing.
85 'enable_data_logging%': 0,
86
andrew@webrtc.orgf9825e52013-05-20 21:18:04 +000087 # Enables the use of protocol buffers for debug recordings.
88 'enable_protobuf%': 1,
89
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000090 # Disable these to not build components which can be externally provided.
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020091 'build_expat%': 1,
92 'build_icu%': 1,
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +000093 'build_json%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000094 'build_libjpeg%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +000095 'build_libvpx%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020096 'build_libyuv%': 1,
andrew@webrtc.orgd2c09dd2015-03-11 22:06:55 +000097 'build_openmax_dl%': 1,
minyue@webrtc.org7c112f32015-03-17 14:04:56 +000098 'build_opus%': 1,
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020099 'build_ssl%': 1,
100 'build_vp9%': 1,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000101
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000102 # Disable by default
103 'have_dbus_glib%': 0,
104
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000105 # Make it possible to provide custom locations for some libraries.
kjellanderd6024e32015-09-28 21:16:48 -0700106 'libvpx_dir%': '<(DEPTH)/third_party/libvpx_new',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000107 'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
kjellander@webrtc.org2b69eab2015-02-09 10:01:17 +0000108 'opus_dir%': '<(opus_dir)',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000109
henrika@webrtc.org45db7ee2015-01-12 14:27:23 +0000110 # Use Java based audio layer as default for Android.
111 # Change this setting to 1 to use Open SL audio instead.
112 # TODO(henrika): add support for Open SL ES.
113 'enable_android_opensl%': 0,
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000114
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000115 # Link-Time Optimizations
116 # Executes code generation at link-time instead of compile-time
117 # https://gcc.gnu.org/wiki/LinkTimeOptimization
118 'use_lto%': 0,
119
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000120 # Defer ssl perference to that specified through sslconfig.h instead of
121 # choosing openssl or nss directly. In practice, this can be used to
122 # enable schannel on windows.
123 'use_legacy_ssl_defaults%': 0,
124
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700125 # Determines whether NEON code will be built.
126 'build_with_neon%': 0,
127
Zeke Chin71f6f442015-06-29 14:34:58 -0700128 # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections.
129 # Enabling this may break interop with Android clients that support H264.
130 'use_objc_h264%': 0,
131
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000132 'conditions': [
133 ['build_with_chromium==1', {
134 # Exclude pulse audio on Chromium since its prerequisites don't require
135 # pulse audio.
136 'include_pulse_audio%': 0,
137
138 # Exclude internal ADM since Chromium uses its own IO handling.
139 'include_internal_audio_device%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000140 }, { # Settings for the standalone (not-in-Chromium) build.
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000141 # TODO(andrew): For now, disable the Chrome plugins, which causes a
142 # flood of chromium-style warnings. Investigate enabling them:
143 # http://code.google.com/p/webrtc/issues/detail?id=163
144 'clang_use_chrome_plugins%': 0,
145
henrike@webrtc.org42581542013-07-16 16:37:22 +0000146 'include_pulse_audio%': 1,
147 'include_internal_audio_device%': 1,
henrike@webrtc.org42581542013-07-16 16:37:22 +0000148 }],
149 ['build_with_libjingle==1', {
150 'include_tests%': 0,
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000151 'restrict_webrtc_logging%': 1,
henrike@webrtc.org42581542013-07-16 16:37:22 +0000152 }, {
153 'include_tests%': 1,
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000154 'restrict_webrtc_logging%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000155 }],
156 ['OS=="ios"', {
fischman@webrtc.orgd0f4c212013-08-20 22:16:55 +0000157 'build_libjpeg%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000158 'enable_protobuf%': 0,
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000159 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000160 ['target_arch=="arm" or target_arch=="arm64"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000161 'prefer_fixed_point%': 1,
162 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700163 ['(target_arch=="arm" and (arm_neon==1 or arm_neon_optional==1)) or target_arch=="arm64"', {
164 'build_with_neon%': 1,
165 }],
andrew@webrtc.org34ac9562014-12-30 18:19:56 +0000166 ['OS!="ios" and (target_arch!="arm" or arm_version>=7) and target_arch!="mips64el"', {
andrew@webrtc.org4165f7a2014-10-08 18:01:27 +0000167 'rtc_use_openmax_dl%': 1,
168 }, {
169 'rtc_use_openmax_dl%': 0,
170 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000171 ], # conditions
172 },
173 'target_defaults': {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000174 'conditions': [
andrew@webrtc.orgf1a48172013-11-07 23:47:26 +0000175 ['restrict_webrtc_logging==1', {
176 'defines': ['WEBRTC_RESTRICT_LOGGING',],
andrew@webrtc.orgc3e5d342012-11-23 19:30:59 +0000177 }],
tina.legrand@webrtc.org1f8c02a2012-10-25 12:37:08 +0000178 ['build_with_mozilla==1', {
179 'defines': [
180 # Changes settings for Mozilla build.
181 'WEBRTC_MOZILLA_BUILD',
182 ],
183 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000184 ['have_dbus_glib==1', {
185 'defines': [
186 'HAVE_DBUS_GLIB',
187 ],
188 'cflags': [
189 '<!@(pkg-config --cflags dbus-glib-1)',
190 ],
191 }],
henrike@webrtc.orgd72a7592014-09-02 15:41:12 +0000192 ['rtc_relative_path==1', {
193 'defines': ['EXPAT_RELATIVE_PATH',],
194 }],
tommi@webrtc.orga32f0642015-03-08 07:38:31 +0000195 ['os_posix==1', {
196 'configurations': {
197 'Debug_Base': {
198 'defines': [
199 # Chromium's build/common.gypi defines _DEBUG for all posix
200 # _except_ for ios & mac. The size of data types such as
201 # pthread_mutex_t varies between release and debug builds
202 # and is controlled via this flag. Since we now share code
203 # between base/base.gyp and build/common.gypi (this file),
204 # both gyp(i) files, must consistently set this flag uniformly
205 # or else we'll run in to hard-to-figure-out problems where
206 # one compilation unit uses code from another but expects
207 # differently laid out types.
208 # For WebRTC, we want it there as well, because ASSERT and
209 # friends trigger off of it.
210 '_DEBUG',
211 ],
212 },
213 },
214 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000215 ['build_with_chromium==1', {
216 'defines': [
217 # Changes settings for Chromium build.
218 'WEBRTC_CHROMIUM_BUILD',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000219 'LOGGING_INSIDE_WEBRTC',
220 ],
221 'include_dirs': [
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000222 # Include the top-level directory when building in Chrome, so we can
223 # use full paths (e.g. headers inside testing/ or third_party/).
224 '<(DEPTH)',
225 # The overrides must be included before the WebRTC root as that's the
226 # mechanism for selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700227 '../../webrtc_overrides',
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000228 # The WebRTC root is needed to allow includes in the WebRTC code base
229 # to be prefixed with webrtc/.
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000230 '../..',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000231 ],
232 }, {
kjellander@webrtc.orgf2ec8142015-01-30 14:54:36 +0000233 # Include the top-level dir so the WebRTC code can use full paths.
234 'include_dirs': [
235 '../..',
236 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000237 'conditions': [
238 ['os_posix==1', {
solenberg@webrtc.orgc6db88b2014-06-04 17:15:42 +0000239 'conditions': [
240 # -Wextra is currently disabled in Chromium's common.gypi. Enable
241 # for targets that can handle it. For Android/arm64 right now
242 # there will be an 'enumeral and non-enumeral type in conditional
243 # expression' warning in android_tools/ndk_experimental's version
244 # of stlport.
245 # See: https://code.google.com/p/chromium/issues/detail?id=379699
246 ['target_arch!="arm64" or OS!="android"', {
247 'cflags': [
248 '-Wextra',
249 # We need to repeat some flags from Chromium's common.gypi
250 # here that get overridden by -Wextra.
251 '-Wno-unused-parameter',
252 '-Wno-missing-field-initializers',
253 '-Wno-strict-overflow',
254 ],
255 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000256 ],
257 'cflags_cc': [
pbos@webrtc.orgb3cc78d2013-11-21 11:42:02 +0000258 '-Wnon-virtual-dtor',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000259 # This is enabled for clang; enable for gcc as well.
260 '-Woverloaded-virtual',
261 ],
262 }],
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000263 ['clang==1', {
264 'cflags': [
kjellander@webrtc.org7d2b6a92015-01-28 18:37:58 +0000265 '-Wimplicit-fallthrough',
andresp@webrtc.org7fb75ec2013-12-20 20:20:50 +0000266 '-Wthread-safety',
267 ],
268 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000269 ],
270 }],
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000271 ['target_arch=="arm64"', {
272 'defines': [
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700273 'WEBRTC_ARCH_ARM64',
274 'WEBRTC_HAS_NEON',
tkchin@webrtc.org14146e42014-10-31 00:14:39 +0000275 ],
276 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000277 ['target_arch=="arm"', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000278 'defines': [
279 'WEBRTC_ARCH_ARM',
280 ],
281 'conditions': [
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000282 ['arm_version>=7', {
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000283 'defines': ['WEBRTC_ARCH_ARM_V7',],
284 'conditions': [
285 ['arm_neon==1', {
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700286 'defines': ['WEBRTC_HAS_NEON',],
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000287 }],
Andrew MacDonaldcb7f8ce2015-05-19 22:20:17 -0700288 ['arm_neon==0 and arm_neon_optional==1', {
289 'defines': ['WEBRTC_DETECT_NEON',],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000290 }],
291 ],
292 }],
293 ],
294 }],
Richard Colesd417c932015-04-09 17:36:12 +0200295 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000296 'defines': [
297 'MIPS32_LE',
298 ],
299 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000300 ['mips_float_abi=="hard"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000301 'defines': [
302 'MIPS_FPU_LE',
303 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000304 }],
andrew@webrtc.orgd05756f2014-09-30 15:53:24 +0000305 ['mips_arch_variant=="r2"', {
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000306 'defines': [
307 'MIPS32_R2_LE',
308 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000309 }],
310 ['mips_dsp_rev==1', {
311 'defines': [
312 'MIPS_DSP_R1_LE',
313 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000314 }],
315 ['mips_dsp_rev==2', {
316 'defines': [
317 'MIPS_DSP_R1_LE',
318 'MIPS_DSP_R2_LE',
319 ],
andrew@webrtc.org5140e242013-02-21 20:12:21 +0000320 }],
321 ],
322 }],
kjellander@webrtc.org0aa04f92014-03-28 13:14:00 +0000323 ['coverage==1 and OS=="linux"', {
324 'cflags': [ '-ftest-coverage',
325 '-fprofile-arcs' ],
326 'link_settings': { 'libraries': [ '-lgcov' ] },
327 }],
henrike@webrtc.orgcc08e3f2014-03-07 15:30:21 +0000328 ['os_posix==1', {
329 # For access to standard POSIXish features, use WEBRTC_POSIX instead of
330 # a more specific macro.
331 'defines': [
332 'WEBRTC_POSIX',
333 ],
334 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000335 ['OS=="ios"', {
336 'defines': [
337 'WEBRTC_MAC',
338 'WEBRTC_IOS',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000339 ],
340 }],
Zeke Chin71f6f442015-06-29 14:34:58 -0700341 ['OS=="ios" and use_objc_h264==1', {
342 'defines': [
343 'WEBRTC_OBJC_H264',
344 ],
345 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000346 ['OS=="linux"', {
347 'defines': [
348 'WEBRTC_LINUX',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000349 ],
350 }],
351 ['OS=="mac"', {
352 'defines': [
353 'WEBRTC_MAC',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000354 ],
355 }],
356 ['OS=="win"', {
357 'defines': [
358 'WEBRTC_WIN',
359 ],
360 # TODO(andrew): enable all warnings when possible.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000361 # TODO(phoglund): get rid of 4373 supression when
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000362 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
kjellander@webrtc.orgfa53d872013-02-04 10:07:17 +0000363 'msvs_disabled_warnings': [
364 4373, # legacy warning for ignoring const / volatile in signatures.
365 4389, # Signed/unsigned mismatch.
366 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000367 # Re-enable some warnings that Chromium disables.
368 'msvs_disabled_warnings!': [4189,],
369 }],
370 ['OS=="android"', {
371 'defines': [
372 'WEBRTC_LINUX',
373 'WEBRTC_ANDROID',
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000374 ],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000375 'conditions': [
Henrik Kjellanderc0c7d2e2015-09-07 12:57:42 +0200376 ['clang==0', {
Henrik Kjellander5bfc6cb2015-09-21 16:50:45 +0200377 # The Android NDK doesn't provide optimized versions of these
378 # functions. Ensure they are disabled for all compilers.
wjia@webrtc.orgb1193692013-01-12 01:52:07 +0000379 'cflags': [
380 '-fno-builtin-cos',
381 '-fno-builtin-sin',
382 '-fno-builtin-cosf',
383 '-fno-builtin-sinf',
384 ],
385 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000386 ],
387 }],
Tommi931e6582015-05-20 09:44:38 +0200388 ['include_internal_audio_device==1', {
389 'defines': [
390 'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE',
391 ],
392 }],
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000393 ], # conditions
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000394 'direct_dependent_settings': {
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000395 'conditions': [
396 ['build_with_mozilla==1', {
397 'defines': [
398 # Changes settings for Mozilla build.
399 'WEBRTC_MOZILLA_BUILD',
400 ],
401 }],
402 ['build_with_chromium==1', {
403 'defines': [
404 # Changes settings for Chromium build.
405 'WEBRTC_CHROMIUM_BUILD',
406 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000407 'include_dirs': [
henrikgee2bf412015-09-30 03:48:52 -0700408 # The overrides must be included first as that is the mechanism for
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000409 # selecting the override headers in Chromium.
henrikgee2bf412015-09-30 03:48:52 -0700410 '../../webrtc_overrides',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000411 '../..',
412 ],
413 }, {
414 'include_dirs': [
415 '../..',
416 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000417 }],
418 ['OS=="mac"', {
419 'defines': [
420 'WEBRTC_MAC',
421 ],
422 }],
423 ['OS=="ios"', {
424 'defines': [
425 'WEBRTC_MAC',
426 'WEBRTC_IOS',
427 ],
428 }],
429 ['OS=="win"', {
430 'defines': [
431 'WEBRTC_WIN',
432 ],
433 }],
434 ['OS=="linux"', {
435 'defines': [
436 'WEBRTC_LINUX',
437 ],
438 }],
439 ['OS=="android"', {
440 'defines': [
441 'WEBRTC_LINUX',
442 'WEBRTC_ANDROID',
443 ],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000444 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000445 ['os_posix==1', {
446 # For access to standard POSIXish features, use WEBRTC_POSIX instead
447 # of a more specific macro.
448 'defines': [
449 'WEBRTC_POSIX',
450 ],
451 }],
sergeyu@chromium.org6ebfd342013-05-22 18:22:21 +0000452 ],
453 },
andrew@webrtc.org14b43be2012-10-22 18:19:23 +0000454 }, # target_defaults
455}
456