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