From 6ebfd346aed8d55df90e7b070a6dec414cf5e767 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 22 May 2013 18:22:21 +0000 Subject: [PATCH] Add direct_dependent_settings in common.gypi. When building chromium targets that depend on webrtc, compiler settings must have the include path to webrtc and webrtc-specific defines that the headers may depend on. Added direct_dependent_settings in common.gyp, so that all webrtc target propagate these settings to dependencies. R=andrew@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1371005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4084 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/build/common.gypi | 53 +++++++++++++++++++ .../desktop_capture/desktop_capture.gypi | 17 ------ 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 1959b50912..d38c27cedd 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -308,6 +308,59 @@ ], }], ], # conditions + 'direct_dependent_settings': { + 'include_dirs': [ + '../..', + ], + 'conditions': [ + ['build_with_mozilla==1', { + 'defines': [ + # Changes settings for Mozilla build. + 'WEBRTC_MOZILLA_BUILD', + ], + }], + ['build_with_chromium==1', { + 'defines': [ + # Changes settings for Chromium build. + 'WEBRTC_CHROMIUM_BUILD', + ], + }], + ['OS=="mac"', { + 'defines': [ + 'WEBRTC_MAC', + ], + }], + ['OS=="ios"', { + 'defines': [ + 'WEBRTC_MAC', + 'WEBRTC_IOS', + ], + }], + ['OS=="win"', { + 'defines': [ + 'WEBRTC_WIN', + ], + }], + ['OS=="linux"', { + 'defines': [ + 'WEBRTC_LINUX', + ], + }], + ['OS=="android"', { + 'defines': [ + 'WEBRTC_LINUX', + 'WEBRTC_ANDROID', + ], + 'conditions': [ + ['enable_android_opensl==1', { + 'defines': [ + 'WEBRTC_ANDROID_OPENSLES', + ], + }] + ], + }], + ], + }, }, # target_defaults } diff --git a/webrtc/modules/desktop_capture/desktop_capture.gypi b/webrtc/modules/desktop_capture/desktop_capture.gypi index d34cd64b4a..8ff238be57 100644 --- a/webrtc/modules/desktop_capture/desktop_capture.gypi +++ b/webrtc/modules/desktop_capture/desktop_capture.gypi @@ -26,23 +26,6 @@ 'dependencies': [ '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', ], - 'direct_dependent_settings': { - # Headers may use include path relative to webrtc root and depend on - # WEBRTC_WIN define, so we need to make sure dependent targets have - # these settings. - # - # TODO(sergeyu): Move these settings to common.gypi - 'include_dirs': [ - '../../..', - ], - 'conditions': [ - ['OS=="win"', { - 'defines': [ - 'WEBRTC_WIN', - ], - }], - ], - }, 'sources': [ "desktop_capturer.h", "desktop_frame.cc",