2012-03-01 21:39:57 +00:00
|
|
|
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
|
|
{
|
2012-08-09 18:28:40 +00:00
|
|
|
# Nesting is required in order to use variables for setting other variables.
|
2011-07-07 08:21:25 +00:00
|
|
|
'variables': {
|
2011-07-22 00:49:35 +00:00
|
|
|
'variables': {
|
2012-07-23 16:28:02 +00:00
|
|
|
'variables': {
|
2012-08-09 18:28:40 +00:00
|
|
|
'variables': {
|
|
|
|
|
# This will be set to zero in the supplement.gypi triggered by a
|
|
|
|
|
# gclient hook in the standalone build.
|
|
|
|
|
'build_with_chromium%': 1,
|
|
|
|
|
},
|
|
|
|
|
'build_with_chromium%': '<(build_with_chromium)',
|
|
|
|
|
|
|
|
|
|
'conditions': [
|
|
|
|
|
['build_with_chromium==1', {
|
|
|
|
|
'webrtc_root%': '<(DEPTH)/third_party/webrtc',
|
|
|
|
|
}, {
|
2012-10-22 18:19:23 +00:00
|
|
|
'webrtc_root%': '<(DEPTH)/webrtc',
|
2012-08-09 18:28:40 +00:00
|
|
|
}],
|
|
|
|
|
],
|
2012-07-23 16:28:02 +00:00
|
|
|
},
|
|
|
|
|
'build_with_chromium%': '<(build_with_chromium)',
|
2012-08-09 18:28:40 +00:00
|
|
|
'webrtc_root%': '<(webrtc_root)',
|
|
|
|
|
|
|
|
|
|
'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
|
2012-10-27 17:46:55 +00:00
|
|
|
'include_opus%': 1,
|
2011-07-22 00:49:35 +00:00
|
|
|
},
|
|
|
|
|
'build_with_chromium%': '<(build_with_chromium)',
|
2012-07-23 16:28:02 +00:00
|
|
|
'webrtc_root%': '<(webrtc_root)',
|
2012-08-09 18:28:40 +00:00
|
|
|
'webrtc_vp8_dir%': '<(webrtc_vp8_dir)',
|
2012-10-19 07:13:52 +00:00
|
|
|
'include_opus%': '<(include_opus)',
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-10-19 17:53:56 +00:00
|
|
|
# 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.
|
|
|
|
|
#
|
2012-01-19 20:10:19 +00:00
|
|
|
# We can set this here to have WebRTC code treated as Chromium code. Our
|
|
|
|
|
# third party code will still have the reduced warning settings.
|
2011-10-19 17:53:56 +00:00
|
|
|
'chromium_code': 1,
|
|
|
|
|
|
2011-08-31 17:03:54 +00:00
|
|
|
# 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,
|
|
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
# Selects fixed-point code where possible.
|
2011-07-30 01:33:22 +00:00
|
|
|
'prefer_fixed_point%': 0,
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-08-29 07:39:02 +00:00
|
|
|
# Enable data logging. Produces text files with data logged within engines
|
|
|
|
|
# which can be easily parsed for offline processing.
|
|
|
|
|
'enable_data_logging%': 0,
|
|
|
|
|
|
2011-12-20 22:07:48 +00:00
|
|
|
# Disable these to not build components which can be externally provided.
|
|
|
|
|
'build_libjpeg%': 1,
|
|
|
|
|
'build_libyuv%': 1,
|
2012-09-10 17:58:21 +00:00
|
|
|
'build_libvpx%': 1,
|
2011-12-20 22:07:48 +00:00
|
|
|
|
2012-10-25 12:37:08 +00:00
|
|
|
# Enable to use the Mozilla internal settings.
|
2012-10-19 07:13:52 +00:00
|
|
|
'build_with_mozilla%': 0,
|
|
|
|
|
|
2012-07-27 18:21:16 +00:00
|
|
|
'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
|
2012-07-23 16:28:02 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
'conditions': [
|
2011-07-21 20:45:31 +00:00
|
|
|
['build_with_chromium==1', {
|
2011-08-19 22:56:22 +00:00
|
|
|
# Exclude pulse audio on Chromium since its prerequisites don't require
|
|
|
|
|
# pulse audio.
|
2011-07-21 20:45:31 +00:00
|
|
|
'include_pulse_audio%': 0,
|
2011-08-31 17:03:54 +00:00
|
|
|
|
2011-08-19 22:56:22 +00:00
|
|
|
# Exclude internal ADM since Chromium uses its own IO handling.
|
2011-08-16 07:44:19 +00:00
|
|
|
'include_internal_audio_device%': 0,
|
2011-10-21 15:29:16 +00:00
|
|
|
|
2012-01-19 20:10:19 +00:00
|
|
|
# Exclude internal VCM in Chromium build.
|
2011-10-19 18:42:17 +00:00
|
|
|
'include_internal_video_capture%': 0,
|
2011-10-21 15:29:16 +00:00
|
|
|
|
2012-01-19 20:10:19 +00:00
|
|
|
# Exclude internal video render module in Chromium build.
|
2011-10-19 18:42:17 +00:00
|
|
|
'include_internal_video_render%': 0,
|
2011-09-12 12:24:39 +00:00
|
|
|
|
2012-07-23 16:28:02 +00:00
|
|
|
'include_video_engine_file_api%': 0,
|
|
|
|
|
|
2012-08-10 00:41:18 +00:00
|
|
|
'include_tests%': 0,
|
|
|
|
|
|
2011-12-03 00:03:31 +00:00
|
|
|
# Disable the use of protocol buffers in production code.
|
|
|
|
|
'enable_protobuf%': 0,
|
2012-10-18 10:00:52 +00:00
|
|
|
|
2012-11-14 19:07:54 +00:00
|
|
|
'enable_tracing%': 0,
|
|
|
|
|
|
2012-11-19 01:41:59 +00:00
|
|
|
'enable_android_opensl%': 0,
|
2012-08-09 18:28:40 +00:00
|
|
|
}, { # Settings for the standalone (not-in-Chromium) build.
|
2011-07-21 20:45:31 +00:00
|
|
|
'include_pulse_audio%': 1,
|
2011-08-16 07:44:19 +00:00
|
|
|
'include_internal_audio_device%': 1,
|
2011-10-19 18:42:17 +00:00
|
|
|
'include_internal_video_capture%': 1,
|
|
|
|
|
'include_internal_video_render%': 1,
|
2012-07-23 16:28:02 +00:00
|
|
|
'include_video_engine_file_api%': 1,
|
2011-12-03 00:03:31 +00:00
|
|
|
'enable_protobuf%': 1,
|
2012-11-14 19:07:54 +00:00
|
|
|
'enable_tracing%': 1,
|
2012-08-10 00:41:18 +00:00
|
|
|
'include_tests%': 1,
|
2011-12-03 00:03:31 +00:00
|
|
|
|
2012-05-01 21:39:34 +00:00
|
|
|
# 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,
|
2012-09-18 20:19:00 +00:00
|
|
|
|
|
|
|
|
# Switch between Android audio device OpenSL ES implementation
|
|
|
|
|
# and Java Implementation
|
2012-11-29 03:13:00 +00:00
|
|
|
'enable_android_opensl%': 0,
|
2011-07-21 20:45:31 +00:00
|
|
|
}],
|
2012-09-10 17:58:21 +00:00
|
|
|
['OS=="ios"', {
|
|
|
|
|
'enable_video%': 0,
|
|
|
|
|
'enable_protobuf%': 0,
|
|
|
|
|
'build_libjpeg%': 0,
|
|
|
|
|
'build_libyuv%': 0,
|
|
|
|
|
'build_libvpx%': 0,
|
|
|
|
|
'include_tests%': 0,
|
|
|
|
|
}],
|
2012-09-14 17:28:32 +00:00
|
|
|
['target_arch=="arm"', {
|
|
|
|
|
'prefer_fixed_point%': 1,
|
|
|
|
|
}],
|
2011-07-07 08:21:25 +00:00
|
|
|
], # conditions
|
|
|
|
|
},
|
|
|
|
|
'target_defaults': {
|
|
|
|
|
'include_dirs': [
|
2012-10-22 21:51:58 +00:00
|
|
|
# TODO(andrew): Remove '..' when we've added webrtc/ to include paths.
|
|
|
|
|
'..',
|
2013-01-28 20:00:03 +00:00
|
|
|
# Allow includes to be prefixed with webrtc/ in case it is not an
|
|
|
|
|
# immediate subdirectory of <(DEPTH).
|
2012-10-22 21:51:58 +00:00
|
|
|
'../..',
|
2013-01-28 20:00:03 +00:00
|
|
|
# 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)',
|
2011-07-07 08:21:25 +00:00
|
|
|
],
|
2012-04-24 14:50:50 +00:00
|
|
|
'defines': [
|
2012-07-25 15:45:33 +00:00
|
|
|
# TODO(leozwang): Run this as a gclient hook rather than at build-time:
|
|
|
|
|
# http://code.google.com/p/webrtc/issues/detail?id=687
|
2012-07-27 08:07:49 +00:00
|
|
|
'WEBRTC_SVNREVISION="Unavailable(issue687)"',
|
2012-07-25 15:45:33 +00:00
|
|
|
#'WEBRTC_SVNREVISION="<!(python <(webrtc_root)/build/version.py)"',
|
2012-04-24 14:50:50 +00:00
|
|
|
],
|
2011-07-07 08:21:25 +00:00
|
|
|
'conditions': [
|
2012-11-23 19:30:59 +00:00
|
|
|
['enable_tracing==1', {
|
|
|
|
|
'defines': ['WEBRTC_LOGGING',],
|
|
|
|
|
}],
|
2012-10-25 12:37:08 +00:00
|
|
|
['build_with_mozilla==1', {
|
|
|
|
|
'defines': [
|
|
|
|
|
# Changes settings for Mozilla build.
|
|
|
|
|
'WEBRTC_MOZILLA_BUILD',
|
|
|
|
|
],
|
|
|
|
|
}],
|
2011-11-14 09:39:31 +00:00
|
|
|
['build_with_chromium==1', {
|
|
|
|
|
'defines': [
|
2011-12-09 09:58:39 +00:00
|
|
|
# Changes settings for Chromium build.
|
|
|
|
|
'WEBRTC_CHROMIUM_BUILD',
|
2012-01-19 20:10:19 +00:00
|
|
|
],
|
|
|
|
|
}, {
|
|
|
|
|
'conditions': [
|
|
|
|
|
['os_posix==1', {
|
|
|
|
|
'cflags': [
|
|
|
|
|
'-Wextra',
|
|
|
|
|
# We need to repeat some flags from Chromium's common.gypi here
|
|
|
|
|
# that get overridden by -Wextra.
|
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
|
],
|
2012-02-28 23:14:11 +00:00
|
|
|
'cflags_cc': [
|
|
|
|
|
# This is enabled for clang; enable for gcc as well.
|
|
|
|
|
'-Woverloaded-virtual',
|
|
|
|
|
],
|
2012-01-19 20:10:19 +00:00
|
|
|
}],
|
|
|
|
|
],
|
2011-11-14 09:39:31 +00:00
|
|
|
}],
|
2012-08-28 04:09:50 +00:00
|
|
|
['target_arch=="arm"', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_ARCH_ARM',
|
|
|
|
|
],
|
|
|
|
|
'conditions': [
|
|
|
|
|
['armv7==1', {
|
2012-09-13 16:44:46 +00:00
|
|
|
'defines': ['WEBRTC_ARCH_ARM_V7',],
|
|
|
|
|
'conditions': [
|
|
|
|
|
['arm_neon==1', {
|
|
|
|
|
'defines': ['WEBRTC_ARCH_ARM_NEON',],
|
|
|
|
|
}, {
|
|
|
|
|
'defines': ['WEBRTC_DETECT_ARM_NEON',],
|
|
|
|
|
}],
|
2012-08-28 04:09:50 +00:00
|
|
|
],
|
|
|
|
|
}],
|
|
|
|
|
],
|
|
|
|
|
}],
|
2012-09-10 17:58:21 +00:00
|
|
|
['OS=="ios"', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_MAC',
|
2012-09-11 17:25:46 +00:00
|
|
|
'WEBRTC_IOS',
|
2012-09-10 17:58:21 +00:00
|
|
|
'WEBRTC_THREAD_RR',
|
|
|
|
|
'WEBRTC_CLOCK_TYPE_REALTIME',
|
|
|
|
|
],
|
|
|
|
|
}],
|
2011-07-07 08:21:25 +00:00
|
|
|
['OS=="linux"', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_LINUX',
|
|
|
|
|
'WEBRTC_THREAD_RR',
|
2011-08-31 17:03:54 +00:00
|
|
|
# TODO(andrew): can we select this automatically?
|
2011-07-07 08:21:25 +00:00
|
|
|
# Define this if the Linux system does not support CLOCK_MONOTONIC.
|
|
|
|
|
#'WEBRTC_CLOCK_TYPE_REALTIME',
|
|
|
|
|
],
|
|
|
|
|
}],
|
|
|
|
|
['OS=="mac"', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_MAC',
|
|
|
|
|
'WEBRTC_THREAD_RR',
|
|
|
|
|
'WEBRTC_CLOCK_TYPE_REALTIME',
|
|
|
|
|
],
|
|
|
|
|
}],
|
|
|
|
|
['OS=="win"', {
|
|
|
|
|
'defines': [
|
2012-03-01 21:39:57 +00:00
|
|
|
'WEBRTC_WIN',
|
2012-01-19 20:10:19 +00:00
|
|
|
],
|
2012-04-10 07:13:46 +00:00
|
|
|
# TODO(andrew): enable all warnings when possible.
|
2013-02-04 10:07:17 +00:00
|
|
|
# TODO(phoglund): get rid of 4373 supression when
|
2012-02-07 14:56:45 +00:00
|
|
|
# http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
|
2013-02-04 10:07:17 +00:00
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
|
4373, # legacy warning for ignoring const / volatile in signatures.
|
|
|
|
|
4389, # Signed/unsigned mismatch.
|
|
|
|
|
],
|
2012-05-08 18:00:57 +00:00
|
|
|
# Re-enable some warnings that Chromium disables.
|
|
|
|
|
'msvs_disabled_warnings!': [4189,],
|
2011-07-28 18:23:31 +00:00
|
|
|
}],
|
2012-02-22 16:05:19 +00:00
|
|
|
['OS=="android"', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_LINUX',
|
2012-03-01 21:39:57 +00:00
|
|
|
'WEBRTC_ANDROID',
|
2012-02-22 16:05:19 +00:00
|
|
|
# TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
|
|
|
|
|
# support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
|
|
|
|
|
# remove it after I verify that CLOCK_MONOTONIC is fully functional
|
|
|
|
|
# with condition and event functions in system_wrappers.
|
|
|
|
|
'WEBRTC_CLOCK_TYPE_REALTIME',
|
|
|
|
|
'WEBRTC_THREAD_RR',
|
2012-09-18 20:19:00 +00:00
|
|
|
],
|
|
|
|
|
'conditions': [
|
|
|
|
|
['enable_android_opensl==1', {
|
|
|
|
|
'defines': [
|
|
|
|
|
'WEBRTC_ANDROID_OPENSLES',
|
|
|
|
|
],
|
|
|
|
|
}],
|
2013-01-12 01:52:07 +00:00
|
|
|
['clang!=1', {
|
|
|
|
|
# The Android NDK doesn't provide optimized versions of these
|
|
|
|
|
# functions. Ensure they are disabled for all compilers.
|
|
|
|
|
'cflags': [
|
|
|
|
|
'-fno-builtin-cos',
|
|
|
|
|
'-fno-builtin-sin',
|
|
|
|
|
'-fno-builtin-cosf',
|
|
|
|
|
'-fno-builtin-sinf',
|
|
|
|
|
],
|
|
|
|
|
}],
|
2012-02-22 16:05:19 +00:00
|
|
|
],
|
|
|
|
|
}],
|
2012-01-19 20:10:19 +00:00
|
|
|
], # conditions
|
2011-07-07 08:21:25 +00:00
|
|
|
}, # target_defaults
|
|
|
|
|
}
|
|
|
|
|
|