andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | # 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.org | e1b9880 | 2014-01-21 15:54:56 +0000 | [diff] [blame] | 17 | # This will already be set to zero by supplement.gypi |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 18 | 'build_with_chromium%': 1, |
| 19 | }, |
| 20 | 'build_with_chromium%': '<(build_with_chromium)', |
| 21 | |
| 22 | 'conditions': [ |
henrike@webrtc.org | 8eea45a | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 23 | ['build_with_chromium==1', { |
| 24 | 'build_with_libjingle': 1, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 25 | 'webrtc_root%': '<(DEPTH)/third_party/webrtc', |
henrike@webrtc.org | 6504a1d | 2013-07-03 21:50:33 +0000 | [diff] [blame] | 26 | 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests.gyp', |
henrike@webrtc.org | 5b871f8 | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 27 | 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', |
michaelbai@google.com | e08d28e | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 28 | 'gen_core_neon_offsets_gyp%': '<(DEPTH)/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 29 | }, { |
henrike@webrtc.org | 8eea45a | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 30 | 'build_with_libjingle%': 0, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 31 | 'webrtc_root%': '<(DEPTH)/webrtc', |
henrike@webrtc.org | 6504a1d | 2013-07-03 21:50:33 +0000 | [diff] [blame] | 32 | 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_test_noop.gyp', |
henrike@webrtc.org | 5b871f8 | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 33 | 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', |
michaelbai@google.com | e08d28e | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 34 | 'gen_core_neon_offsets_gyp%':'<(DEPTH)/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 35 | }], |
| 36 | ], |
| 37 | }, |
| 38 | 'build_with_chromium%': '<(build_with_chromium)', |
fischman@webrtc.org | db1733f | 2013-02-20 23:13:46 +0000 | [diff] [blame] | 39 | 'build_with_libjingle%': '<(build_with_libjingle)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 40 | 'webrtc_root%': '<(webrtc_root)', |
henrike@webrtc.org | 6504a1d | 2013-07-03 21:50:33 +0000 | [diff] [blame] | 41 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | 5b871f8 | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 42 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
michaelbai@google.com | e08d28e | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 43 | 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 44 | 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', |
stefan@webrtc.org | 6dd15dc | 2013-07-09 12:32:35 +0000 | [diff] [blame] | 45 | 'rbe_components_path%': '<(webrtc_root)/modules/remote_bitrate_estimator', |
leozwang@webrtc.org | 1e25690 | 2012-10-27 17:46:55 +0000 | [diff] [blame] | 46 | 'include_opus%': 1, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 47 | }, |
| 48 | 'build_with_chromium%': '<(build_with_chromium)', |
fischman@webrtc.org | db1733f | 2013-02-20 23:13:46 +0000 | [diff] [blame] | 49 | 'build_with_libjingle%': '<(build_with_libjingle)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 50 | 'webrtc_root%': '<(webrtc_root)', |
henrike@webrtc.org | 6504a1d | 2013-07-03 21:50:33 +0000 | [diff] [blame] | 51 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | 5b871f8 | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 52 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
michaelbai@google.com | e08d28e | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 53 | 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 54 | 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', |
| 55 | 'include_opus%': '<(include_opus)', |
stefan@webrtc.org | 6dd15dc | 2013-07-09 12:32:35 +0000 | [diff] [blame] | 56 | 'rbe_components_path%': '<(rbe_components_path)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 57 | |
| 58 | # The Chromium common.gypi we use treats all gyp files without |
| 59 | # chromium_code==1 as third party code. This disables many of the |
| 60 | # preferred warning settings. |
| 61 | # |
| 62 | # We can set this here to have WebRTC code treated as Chromium code. Our |
| 63 | # third party code will still have the reduced warning settings. |
| 64 | 'chromium_code': 1, |
| 65 | |
kjellander@webrtc.org | 9136607 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 66 | # Set to 1 to enable code coverage on Linux using the gcov library. |
| 67 | 'coverage%': 0, |
| 68 | |
solenberg@webrtc.org | 77c834d | 2013-10-30 16:06:26 +0000 | [diff] [blame] | 69 | # Remote bitrate estimator logging/plotting. |
| 70 | 'enable_bwe_test_logging%': 0, |
| 71 | |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 72 | # Adds video support to dependencies shared by voice and video engine. |
| 73 | # This should normally be enabled; the intended use is to disable only |
| 74 | # when building voice engine exclusively. |
| 75 | 'enable_video%': 1, |
| 76 | |
| 77 | # Selects fixed-point code where possible. |
| 78 | 'prefer_fixed_point%': 0, |
| 79 | |
| 80 | # Enable data logging. Produces text files with data logged within engines |
| 81 | # which can be easily parsed for offline processing. |
| 82 | 'enable_data_logging%': 0, |
| 83 | |
andrew@webrtc.org | 5f600c8 | 2013-05-20 21:18:04 +0000 | [diff] [blame] | 84 | # Enables the use of protocol buffers for debug recordings. |
| 85 | 'enable_protobuf%': 1, |
| 86 | |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 87 | # Disable these to not build components which can be externally provided. |
| 88 | 'build_libjpeg%': 1, |
| 89 | 'build_libyuv%': 1, |
| 90 | 'build_libvpx%': 1, |
| 91 | |
henrike@webrtc.org | f7795df | 2014-05-13 18:00:26 +0000 | [diff] [blame^] | 92 | # Disable by default |
| 93 | 'have_dbus_glib%': 0, |
| 94 | |
tina.legrand@webrtc.org | 6fc71d9 | 2012-10-25 12:37:08 +0000 | [diff] [blame] | 95 | # Enable to use the Mozilla internal settings. |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 96 | 'build_with_mozilla%': 0, |
| 97 | |
| 98 | 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', |
| 99 | |
andrew@webrtc.org | 85e32df | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 100 | # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU |
| 101 | # This may be subject to change in accordance to Chromium's MIPS flags |
| 102 | 'mips_arch_variant%': 'mips32r1', |
| 103 | 'mips_dsp_rev%': 0, |
| 104 | 'mips_fpu%' : 1, |
henrike@webrtc.org | 7540ded | 2013-09-27 22:34:35 +0000 | [diff] [blame] | 105 | 'enable_android_opensl%': 1, |
andrew@webrtc.org | 85e32df | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 106 | |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 107 | 'conditions': [ |
| 108 | ['build_with_chromium==1', { |
| 109 | # Exclude pulse audio on Chromium since its prerequisites don't require |
| 110 | # pulse audio. |
| 111 | 'include_pulse_audio%': 0, |
| 112 | |
| 113 | # Exclude internal ADM since Chromium uses its own IO handling. |
| 114 | 'include_internal_audio_device%': 0, |
| 115 | |
| 116 | # Exclude internal VCM in Chromium build. |
| 117 | 'include_internal_video_capture%': 0, |
| 118 | |
| 119 | # Exclude internal video render module in Chromium build. |
| 120 | 'include_internal_video_render%': 0, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 121 | }, { # Settings for the standalone (not-in-Chromium) build. |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 122 | # TODO(andrew): For now, disable the Chrome plugins, which causes a |
| 123 | # flood of chromium-style warnings. Investigate enabling them: |
| 124 | # http://code.google.com/p/webrtc/issues/detail?id=163 |
| 125 | 'clang_use_chrome_plugins%': 0, |
| 126 | |
henrike@webrtc.org | 8eea45a | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 127 | 'include_pulse_audio%': 1, |
| 128 | 'include_internal_audio_device%': 1, |
| 129 | 'include_internal_video_capture%': 1, |
| 130 | 'include_internal_video_render%': 1, |
henrike@webrtc.org | 8eea45a | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 131 | }], |
| 132 | ['build_with_libjingle==1', { |
| 133 | 'include_tests%': 0, |
andrew@webrtc.org | 0aa16d7 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 134 | 'restrict_webrtc_logging%': 1, |
henrike@webrtc.org | 8eea45a | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 135 | }, { |
| 136 | 'include_tests%': 1, |
andrew@webrtc.org | 0aa16d7 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 137 | 'restrict_webrtc_logging%': 0, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 138 | }], |
| 139 | ['OS=="ios"', { |
fischman@webrtc.org | e4918c7 | 2013-08-20 22:16:55 +0000 | [diff] [blame] | 140 | 'build_libjpeg%': 0, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 141 | 'enable_protobuf%': 0, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 142 | }], |
fischman@webrtc.org | 7ac916b | 2013-09-05 16:46:36 +0000 | [diff] [blame] | 143 | ['target_arch=="arm" or target_arch=="armv7"', { |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 144 | 'prefer_fixed_point%': 1, |
| 145 | }], |
| 146 | ], # conditions |
| 147 | }, |
| 148 | 'target_defaults': { |
| 149 | 'include_dirs': [ |
kjellander@webrtc.org | 437f62b | 2013-01-28 20:00:03 +0000 | [diff] [blame] | 150 | # To include the top-level directory when building in Chrome, so we can |
| 151 | # use full paths (e.g. headers inside testing/ or third_party/). |
| 152 | '<(DEPTH)', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 153 | ], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 154 | 'conditions': [ |
andrew@webrtc.org | 0aa16d7 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 155 | ['restrict_webrtc_logging==1', { |
| 156 | 'defines': ['WEBRTC_RESTRICT_LOGGING',], |
andrew@webrtc.org | 521d30d | 2012-11-23 19:30:59 +0000 | [diff] [blame] | 157 | }], |
tina.legrand@webrtc.org | 6fc71d9 | 2012-10-25 12:37:08 +0000 | [diff] [blame] | 158 | ['build_with_mozilla==1', { |
| 159 | 'defines': [ |
| 160 | # Changes settings for Mozilla build. |
| 161 | 'WEBRTC_MOZILLA_BUILD', |
| 162 | ], |
| 163 | }], |
henrike@webrtc.org | f7795df | 2014-05-13 18:00:26 +0000 | [diff] [blame^] | 164 | ['have_dbus_glib==1', { |
| 165 | 'defines': [ |
| 166 | 'HAVE_DBUS_GLIB', |
| 167 | ], |
| 168 | 'cflags': [ |
| 169 | '<!@(pkg-config --cflags dbus-glib-1)', |
| 170 | ], |
| 171 | }], |
andrew@webrtc.org | 4adc7ad | 2013-12-09 16:23:00 +0000 | [diff] [blame] | 172 | ['enable_video==1', { |
| 173 | 'defines': ['WEBRTC_MODULE_UTILITY_VIDEO',], |
| 174 | }], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 175 | ['build_with_chromium==1', { |
| 176 | 'defines': [ |
| 177 | # Changes settings for Chromium build. |
| 178 | 'WEBRTC_CHROMIUM_BUILD', |
henrike@webrtc.org | f7795df | 2014-05-13 18:00:26 +0000 | [diff] [blame^] | 179 | 'LOGGING_INSIDE_WEBRTC', |
| 180 | ], |
| 181 | 'include_dirs': [ |
| 182 | # overrides must be included first as that is the mechanism for |
| 183 | # selecting the override headers in Chromium. |
| 184 | '../overrides', |
| 185 | # Allow includes to be prefixed with webrtc/ in case it is not an |
| 186 | # immediate subdirectory of <(DEPTH). |
| 187 | '../..', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 188 | ], |
| 189 | }, { |
| 190 | 'conditions': [ |
| 191 | ['os_posix==1', { |
| 192 | 'cflags': [ |
| 193 | '-Wextra', |
| 194 | # We need to repeat some flags from Chromium's common.gypi here |
| 195 | # that get overridden by -Wextra. |
| 196 | '-Wno-unused-parameter', |
| 197 | '-Wno-missing-field-initializers', |
kjellander@webrtc.org | 894dab9 | 2013-12-11 13:37:12 +0000 | [diff] [blame] | 198 | '-Wno-strict-overflow', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 199 | ], |
| 200 | 'cflags_cc': [ |
pbos@webrtc.org | 3c3a953 | 2013-11-21 11:42:02 +0000 | [diff] [blame] | 201 | '-Wnon-virtual-dtor', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 202 | # This is enabled for clang; enable for gcc as well. |
| 203 | '-Woverloaded-virtual', |
| 204 | ], |
| 205 | }], |
andresp@webrtc.org | 7e4053c | 2013-12-20 20:20:50 +0000 | [diff] [blame] | 206 | ['clang==1', { |
| 207 | 'cflags': [ |
| 208 | '-Wthread-safety', |
| 209 | ], |
| 210 | }], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 211 | ], |
| 212 | }], |
fischman@webrtc.org | 7ac916b | 2013-09-05 16:46:36 +0000 | [diff] [blame] | 213 | ['target_arch=="arm" or target_arch=="armv7"', { |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 214 | 'defines': [ |
| 215 | 'WEBRTC_ARCH_ARM', |
| 216 | ], |
| 217 | 'conditions': [ |
kjellander@webrtc.org | ba8b32c | 2013-12-10 09:26:07 +0000 | [diff] [blame] | 218 | ['arm_version==7', { |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 219 | 'defines': ['WEBRTC_ARCH_ARM_V7',], |
| 220 | 'conditions': [ |
| 221 | ['arm_neon==1', { |
| 222 | 'defines': ['WEBRTC_ARCH_ARM_NEON',], |
| 223 | }, { |
| 224 | 'defines': ['WEBRTC_DETECT_ARM_NEON',], |
| 225 | }], |
| 226 | ], |
| 227 | }], |
| 228 | ], |
| 229 | }], |
andrew@webrtc.org | 85e32df | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 230 | ['target_arch=="mipsel"', { |
| 231 | 'defines': [ |
| 232 | 'MIPS32_LE', |
| 233 | ], |
| 234 | 'conditions': [ |
| 235 | ['mips_fpu==1', { |
| 236 | 'defines': [ |
| 237 | 'MIPS_FPU_LE', |
| 238 | ], |
| 239 | 'cflags': [ |
| 240 | '-mhard-float', |
| 241 | ], |
| 242 | }, { |
| 243 | 'cflags': [ |
| 244 | '-msoft-float', |
| 245 | ], |
| 246 | }], |
| 247 | ['mips_arch_variant=="mips32r2"', { |
| 248 | 'defines': [ |
| 249 | 'MIPS32_R2_LE', |
| 250 | ], |
| 251 | 'cflags': [ |
| 252 | '-mips32r2', |
| 253 | ], |
| 254 | 'cflags_cc': [ |
| 255 | '-mips32r2', |
| 256 | ], |
| 257 | }], |
| 258 | ['mips_dsp_rev==1', { |
| 259 | 'defines': [ |
| 260 | 'MIPS_DSP_R1_LE', |
| 261 | ], |
| 262 | 'cflags': [ |
| 263 | '-mdsp', |
| 264 | ], |
| 265 | 'cflags_cc': [ |
| 266 | '-mdsp', |
| 267 | ], |
| 268 | }], |
| 269 | ['mips_dsp_rev==2', { |
| 270 | 'defines': [ |
| 271 | 'MIPS_DSP_R1_LE', |
| 272 | 'MIPS_DSP_R2_LE', |
| 273 | ], |
| 274 | 'cflags': [ |
| 275 | '-mdspr2', |
| 276 | ], |
| 277 | 'cflags_cc': [ |
| 278 | '-mdspr2', |
| 279 | ], |
| 280 | }], |
| 281 | ], |
| 282 | }], |
kjellander@webrtc.org | 9136607 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 283 | ['coverage==1 and OS=="linux"', { |
| 284 | 'cflags': [ '-ftest-coverage', |
| 285 | '-fprofile-arcs' ], |
| 286 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
| 287 | }], |
henrike@webrtc.org | b96f214 | 2014-03-07 15:30:21 +0000 | [diff] [blame] | 288 | ['os_posix==1', { |
| 289 | # For access to standard POSIXish features, use WEBRTC_POSIX instead of |
| 290 | # a more specific macro. |
| 291 | 'defines': [ |
| 292 | 'WEBRTC_POSIX', |
| 293 | ], |
| 294 | }], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 295 | ['OS=="ios"', { |
| 296 | 'defines': [ |
| 297 | 'WEBRTC_MAC', |
| 298 | 'WEBRTC_IOS', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 299 | ], |
| 300 | }], |
| 301 | ['OS=="linux"', { |
| 302 | 'defines': [ |
| 303 | 'WEBRTC_LINUX', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 304 | ], |
| 305 | }], |
| 306 | ['OS=="mac"', { |
| 307 | 'defines': [ |
| 308 | 'WEBRTC_MAC', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 309 | ], |
| 310 | }], |
| 311 | ['OS=="win"', { |
| 312 | 'defines': [ |
| 313 | 'WEBRTC_WIN', |
| 314 | ], |
| 315 | # TODO(andrew): enable all warnings when possible. |
kjellander@webrtc.org | cc895d1 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 316 | # TODO(phoglund): get rid of 4373 supression when |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 317 | # http://code.google.com/p/webrtc/issues/detail?id=261 is solved. |
kjellander@webrtc.org | cc895d1 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 318 | 'msvs_disabled_warnings': [ |
| 319 | 4373, # legacy warning for ignoring const / volatile in signatures. |
| 320 | 4389, # Signed/unsigned mismatch. |
| 321 | ], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 322 | # Re-enable some warnings that Chromium disables. |
| 323 | 'msvs_disabled_warnings!': [4189,], |
| 324 | }], |
| 325 | ['OS=="android"', { |
| 326 | 'defines': [ |
| 327 | 'WEBRTC_LINUX', |
| 328 | 'WEBRTC_ANDROID', |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 329 | ], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 330 | 'conditions': [ |
| 331 | ['enable_android_opensl==1', { |
| 332 | 'defines': [ |
| 333 | 'WEBRTC_ANDROID_OPENSLES', |
| 334 | ], |
| 335 | }], |
wjia@webrtc.org | 3d016e1 | 2013-01-12 01:52:07 +0000 | [diff] [blame] | 336 | ['clang!=1', { |
| 337 | # The Android NDK doesn't provide optimized versions of these |
| 338 | # functions. Ensure they are disabled for all compilers. |
| 339 | 'cflags': [ |
| 340 | '-fno-builtin-cos', |
| 341 | '-fno-builtin-sin', |
| 342 | '-fno-builtin-cosf', |
| 343 | '-fno-builtin-sinf', |
| 344 | ], |
| 345 | }], |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 346 | ], |
| 347 | }], |
| 348 | ], # conditions |
sergeyu@chromium.org | e52fbdd | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 349 | 'direct_dependent_settings': { |
sergeyu@chromium.org | e52fbdd | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 350 | 'conditions': [ |
| 351 | ['build_with_mozilla==1', { |
| 352 | 'defines': [ |
| 353 | # Changes settings for Mozilla build. |
| 354 | 'WEBRTC_MOZILLA_BUILD', |
| 355 | ], |
| 356 | }], |
| 357 | ['build_with_chromium==1', { |
| 358 | 'defines': [ |
| 359 | # Changes settings for Chromium build. |
| 360 | 'WEBRTC_CHROMIUM_BUILD', |
| 361 | ], |
henrike@webrtc.org | f7795df | 2014-05-13 18:00:26 +0000 | [diff] [blame^] | 362 | 'include_dirs': [ |
| 363 | # overrides must be included first as that is the mechanism for |
| 364 | # selecting the override headers in Chromium. |
| 365 | '../overrides', |
| 366 | '../..', |
| 367 | ], |
| 368 | }, { |
| 369 | 'include_dirs': [ |
| 370 | '../..', |
| 371 | ], |
sergeyu@chromium.org | e52fbdd | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 372 | }], |
| 373 | ['OS=="mac"', { |
| 374 | 'defines': [ |
| 375 | 'WEBRTC_MAC', |
| 376 | ], |
| 377 | }], |
| 378 | ['OS=="ios"', { |
| 379 | 'defines': [ |
| 380 | 'WEBRTC_MAC', |
| 381 | 'WEBRTC_IOS', |
| 382 | ], |
| 383 | }], |
| 384 | ['OS=="win"', { |
| 385 | 'defines': [ |
| 386 | 'WEBRTC_WIN', |
| 387 | ], |
| 388 | }], |
| 389 | ['OS=="linux"', { |
| 390 | 'defines': [ |
| 391 | 'WEBRTC_LINUX', |
| 392 | ], |
| 393 | }], |
| 394 | ['OS=="android"', { |
| 395 | 'defines': [ |
| 396 | 'WEBRTC_LINUX', |
| 397 | 'WEBRTC_ANDROID', |
| 398 | ], |
| 399 | 'conditions': [ |
| 400 | ['enable_android_opensl==1', { |
| 401 | 'defines': [ |
| 402 | 'WEBRTC_ANDROID_OPENSLES', |
| 403 | ], |
| 404 | }] |
| 405 | ], |
| 406 | }], |
henrike@webrtc.org | f7795df | 2014-05-13 18:00:26 +0000 | [diff] [blame^] | 407 | ['os_posix==1', { |
| 408 | # For access to standard POSIXish features, use WEBRTC_POSIX instead |
| 409 | # of a more specific macro. |
| 410 | 'defines': [ |
| 411 | 'WEBRTC_POSIX', |
| 412 | ], |
| 413 | }], |
sergeyu@chromium.org | e52fbdd | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 414 | ], |
| 415 | }, |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 416 | }, # target_defaults |
| 417 | } |
| 418 | |