# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. # This file contains common settings for building WebRTC components. { # Nesting is required in order to use variables for setting other variables. 'variables': { 'variables': { 'variables': { 'variables': { # This will already be set to zero by supplement.gypi 'build_with_chromium%': 1, }, 'build_with_chromium%': '<(build_with_chromium)', 'conditions': [ ['build_with_chromium==1', { 'build_with_libjingle': 1, 'webrtc_root%': '<(DEPTH)/third_party/webrtc', 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp', 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', 'gen_core_neon_offsets_gyp%': '<(DEPTH)/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp', }, { 'build_with_libjingle%': 0, 'webrtc_root%': '<(DEPTH)/webrtc', 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp', 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', 'gen_core_neon_offsets_gyp%':'<(DEPTH)/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp', }], ], }, 'build_with_chromium%': '<(build_with_chromium)', 'build_with_libjingle%': '<(build_with_libjingle)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', 'modules_java_gyp_path%': '<(modules_java_gyp_path)', 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9', 'rbe_components_path%': '<(webrtc_root)/modules/remote_bitrate_estimator', 'include_opus%': 1, }, 'build_with_chromium%': '<(build_with_chromium)', 'build_with_libjingle%': '<(build_with_libjingle)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', 'modules_java_gyp_path%': '<(modules_java_gyp_path)', 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', 'webrtc_vp9_dir%': '<(webrtc_vp9_dir)', 'include_opus%': '<(include_opus)', 'rtc_relative_path%': 1, 'rbe_components_path%': '<(rbe_components_path)', 'external_libraries%': '0', 'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/', # openssl needs to be defined or gyp will complain. Is is only used when # when providing external libraries so just use current directory as a # placeholder. 'ssl_root%': '.', # The Chromium common.gypi we use treats all gyp files without # chromium_code==1 as third party code. This disables many of the # preferred warning settings. # # We can set this here to have WebRTC code treated as Chromium code. Our # third party code will still have the reduced warning settings. 'chromium_code': 1, # Set to 1 to enable code coverage on Linux using the gcov library. 'coverage%': 0, # Remote bitrate estimator logging/plotting. 'enable_bwe_test_logging%': 0, # Adds video support to dependencies shared by voice and video engine. # This should normally be enabled; the intended use is to disable only # when building voice engine exclusively. 'enable_video%': 1, # Selects fixed-point code where possible. 'prefer_fixed_point%': 0, # Enable data logging. Produces text files with data logged within engines # which can be easily parsed for offline processing. 'enable_data_logging%': 0, # Enables the use of protocol buffers for debug recordings. 'enable_protobuf%': 1, # Disable these to not build components which can be externally provided. 'build_json%': 1, 'build_libjpeg%': 1, 'build_libyuv%': 1, 'build_libvpx%': 1, 'build_ssl%': 1, # Disable by default 'have_dbus_glib%': 0, # Enable to use the Mozilla internal settings. 'build_with_mozilla%': 0, 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU # This may be subject to change in accordance to Chromium's MIPS flags 'mips_arch_variant%': 'r1', 'mips_dsp_rev%': 0, 'mips_fpu%' : 1, 'enable_android_opensl%': 1, # Link-Time Optimizations # Executes code generation at link-time instead of compile-time # https://gcc.gnu.org/wiki/LinkTimeOptimization 'use_lto%': 0, # Defer ssl perference to that specified through sslconfig.h instead of # choosing openssl or nss directly. In practice, this can be used to # enable schannel on windows. 'use_legacy_ssl_defaults%': 0, 'conditions': [ ['build_with_chromium==1', { # Exclude pulse audio on Chromium since its prerequisites don't require # pulse audio. 'include_pulse_audio%': 0, # Exclude internal ADM since Chromium uses its own IO handling. 'include_internal_audio_device%': 0, }, { # Settings for the standalone (not-in-Chromium) build. # TODO(andrew): For now, disable the Chrome plugins, which causes a # flood of chromium-style warnings. Investigate enabling them: # http://code.google.com/p/webrtc/issues/detail?id=163 'clang_use_chrome_plugins%': 0, 'include_pulse_audio%': 1, 'include_internal_audio_device%': 1, }], ['build_with_libjingle==1', { 'include_tests%': 0, 'restrict_webrtc_logging%': 1, }, { 'include_tests%': 1, 'restrict_webrtc_logging%': 0, }], ['OS=="ios"', { 'build_libjpeg%': 0, 'enable_protobuf%': 0, }], ['target_arch=="arm" or target_arch=="armv7"', { 'prefer_fixed_point%': 1, }], ['OS!="ios" and (target_arch!="arm" or arm_version>=7)', { 'rtc_use_openmax_dl%': 1, }, { 'rtc_use_openmax_dl%': 0, }], ], # conditions }, 'target_defaults': { 'include_dirs': [ # To include the top-level directory when building in Chrome, so we can # use full paths (e.g. headers inside testing/ or third_party/). '<(DEPTH)', ], 'conditions': [ ['restrict_webrtc_logging==1', { 'defines': ['WEBRTC_RESTRICT_LOGGING',], }], ['build_with_mozilla==1', { 'defines': [ # Changes settings for Mozilla build. 'WEBRTC_MOZILLA_BUILD', ], }], ['have_dbus_glib==1', { 'defines': [ 'HAVE_DBUS_GLIB', ], 'cflags': [ '