From f5a91fdfab4f441bf0b10eb3d1089dcf8651456c Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Mon, 23 Jul 2012 16:28:02 +0000 Subject: [PATCH] Make some build settings more flexible. BUG=issue676 TEST=trybots Review URL: https://webrtc-codereview.appspot.com/700006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2524 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/build/common.gypi | 37 ++++++++++++------- src/engine_configurations.h | 5 +-- .../main/source/audio_coding_module.gypi | 33 +++++++++++------ src/modules/modules.gyp | 2 - .../test/video_codecs_test_framework.gypi | 12 ++---- .../codecs/test_framework/test_framework.gypi | 14 ++----- .../codecs/tools/video_codecs_tools.gypi | 12 ++---- .../vp8/main/source/{vp8.gypi => vp8.gyp} | 16 ++++---- .../main/source/video_coding.gypi | 10 +---- src/video_engine/video_engine_core.gypi | 15 ++++---- webrtc.gyp | 3 +- 11 files changed, 76 insertions(+), 83 deletions(-) rename src/modules/video_coding/codecs/vp8/main/source/{vp8.gypi => vp8.gyp} (95%) diff --git a/src/build/common.gypi b/src/build/common.gypi index 86b589053c..81c7560740 100644 --- a/src/build/common.gypi +++ b/src/build/common.gypi @@ -13,12 +13,22 @@ # These variables need to be nested in order to use them in a conditions # block to set other variables. 'variables': { - # This will be set to zero in the supplement.gypi triggered by a gclient - # hook in the standalone build. - 'build_with_chromium%': 1, + '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', + }, { + 'webrtc_root%': '<(DEPTH)/src', + }], + ], }, - 'build_with_chromium%': '<(build_with_chromium)', + 'webrtc_root%': '<(webrtc_root)', # The Chromium common.gypi we use treats all gyp files without # chromium_code==1 as third party code. This disables many of the @@ -44,6 +54,8 @@ 'build_libjpeg%': 1, 'build_libyuv%': 1, + 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', + 'conditions': [ ['OS=="android"', { # On Android, we always prefer fixed_point to reduce CPU usage. @@ -63,16 +75,14 @@ # Exclude internal video render module in Chromium build. 'include_internal_video_render%': 0, + 'include_video_engine_file_api%': 0, + # Disable the use of protocol buffers in production code. 'enable_protobuf%': 0, # Don't include tests for Chromium builds. 'include_tests%': 0, - - 'webrtc_root%': '<(DEPTH)/third_party/webrtc', - }, { - # Settings for the standalone (not-in-Chromium) build. - + }, { # Settings for the standalone (not-in-Chromium) build. 'include_pulse_audio%': 1, 'include_internal_audio_device%': 1, @@ -81,12 +91,12 @@ 'include_internal_video_render%': 1, + 'include_video_engine_file_api%': 1, + 'enable_protobuf%': 1, 'include_tests%': 1, - 'webrtc_root%': '<(DEPTH)/src', - # 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 @@ -96,7 +106,8 @@ }, 'target_defaults': { 'include_dirs': [ - '..','../..', # common_types.h, typedefs.h + # TODO(andrew): we should be able to just use <(webrtc_root) here. + '..','../..', ], 'defines': [ 'WEBRTC_SVNREVISION="