From d7e34e10867f03174ca5aeb9fe2481b9030907cb Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Mon, 26 Jan 2015 19:17:26 +0000 Subject: [PATCH] Make it easier to use external libyuv + cleanup GYP files. It is now easier to use an external libyuv library. Fix some GYP errors. Remove the temporary webrtc_base target (depends on https://codereview.chromium.org/865603002/ being landed first). BUG=4185 R=andresp@webrtc.org, andrew@webrtc.org, perkj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39579004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8154 4adac7df-926f-26a2-2b94-8c16560cd09d --- DEPS | 1 + webrtc/BUILD.gn | 9 +++++++++ webrtc/base/base.gyp | 10 ---------- webrtc/common.gyp | 10 ++++++++++ webrtc/common_audio/common_audio.gyp | 1 - webrtc/common_video/BUILD.gn | 1 + webrtc/common_video/common_video.gyp | 3 +++ webrtc/libjingle/libjingle.gyp | 2 +- webrtc/libjingle/xmpp/xmpp.gyp | 4 ++-- webrtc/modules/audio_device/BUILD.gn | 1 + webrtc/modules/audio_device/audio_device.gypi | 1 + webrtc/modules/video_coding/BUILD.gn | 6 ------ webrtc/modules/video_coding/codecs/vp8/vp8.gyp | 3 --- webrtc/p2p/p2p.gyp | 4 ++-- webrtc/tools/converter/converter.h | 4 ++-- webrtc/tools/frame_analyzer/video_quality_analysis.h | 4 ++-- webrtc/tools/tools.gyp | 6 +++--- webrtc/voice_engine/BUILD.gn | 3 --- webrtc/voice_engine/voice_engine.gyp | 3 --- webrtc/webrtc.gyp | 2 +- 20 files changed, 39 insertions(+), 39 deletions(-) diff --git a/DEPS b/DEPS index 135707a845..8bbf65f220 100644 --- a/DEPS +++ b/DEPS @@ -35,6 +35,7 @@ include_rules = [ '-base', '-chromium', '+gflags', + '+libyuv', '+net', '+talk', '+testing', diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index fdcfdaad23..56531a77c3 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -235,8 +235,11 @@ if (!build_with_chromium) { source_set("webrtc_common") { sources = [ + "common_types.h", "config.h", "config.cc", + "engine_configurations.h", + "typedefs.h", ] if (is_clang) { @@ -248,3 +251,9 @@ source_set("webrtc_common") { configs += [ ":common_config" ] public_configs = [ ":common_inherited_config" ] } + +source_set("gtest_prod") { + sources = [ + "test/testsupport/gtest_prod_util.h", + ] +} diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp index c837b87894..16437be60e 100644 --- a/webrtc/base/base.gyp +++ b/webrtc/base/base.gyp @@ -24,16 +24,6 @@ }], ], 'targets': [ - { - # Temporary target until Chromium's - # src/third_party/libjingle/libjingle.gyp is updated to use rtc_base. - # TODO(kjellander): Remove when r7140 is rolled into Chromium's DEPS. - 'target_name': 'webrtc_base', - 'type': 'none', - 'dependencies': [ - 'rtc_base', - ], - }, { # The subset of rtc_base approved for use outside of libjingle. 'target_name': 'rtc_base_approved', diff --git a/webrtc/common.gyp b/webrtc/common.gyp index b6b6354ab9..af2065505d 100644 --- a/webrtc/common.gyp +++ b/webrtc/common.gyp @@ -12,8 +12,18 @@ 'target_name': 'webrtc_common', 'type': 'static_library', 'sources': [ + 'common_types.h', 'config.h', 'config.cc', + 'engine_configurations.h', + 'typedefs.h', + ], + }, + { + 'target_name': 'gtest_prod', + 'type': 'static_library', + 'sources': [ + 'test/testsupport/gtest_prod_util.h', ], }, ], diff --git a/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp index 056013b7bf..d50c2c557c 100644 --- a/webrtc/common_audio/common_audio.gyp +++ b/webrtc/common_audio/common_audio.gyp @@ -32,7 +32,6 @@ 'audio_converter.cc', 'audio_converter.h', 'audio_util.cc', - 'audio_util.h', 'blocker.cc', 'blocker.h', 'fir_filter.cc', diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index d7f6dc23c2..8085bceeb0 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -48,6 +48,7 @@ source_set("common_video") { if (rtc_build_libyuv) { deps += [ "//third_party/libyuv" ] + public_deps = [ "//third_party/libyuv" ] } else { # Need to add a directory normally exported by libyuv. include_dirs += [ "//third_party/libyuv/include" ] diff --git a/webrtc/common_video/common_video.gyp b/webrtc/common_video/common_video.gyp index 69e5eb3c9c..c45113f946 100644 --- a/webrtc/common_video/common_video.gyp +++ b/webrtc/common_video/common_video.gyp @@ -29,6 +29,9 @@ 'conditions': [ ['build_libyuv==1', { 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',], + 'export_dependent_settings': [ + '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv', + ], }, { # Need to add a directory normally exported by libyuv.gyp. 'include_dirs': ['<(libyuv_dir)/include',], diff --git a/webrtc/libjingle/libjingle.gyp b/webrtc/libjingle/libjingle.gyp index f1ed3baf9a..37e2511e2c 100644 --- a/webrtc/libjingle/libjingle.gyp +++ b/webrtc/libjingle/libjingle.gyp @@ -30,7 +30,7 @@ 'type': 'static_library', 'dependencies': [ '<(talk_root)/libjingle.gyp:libjingle_media', - '<(webrtc_root)/base/base.gyp:webrtc_base', + '<(webrtc_root)/base/base.gyp:rtc_base', '<(webrtc_root)/libjingle/xmpp/xmpp.gyp:rtc_xmpp', '<(DEPTH)/third_party/expat/expat.gyp:expat', ], diff --git a/webrtc/libjingle/xmpp/xmpp.gyp b/webrtc/libjingle/xmpp/xmpp.gyp index 35755d6880..b46c62c655 100644 --- a/webrtc/libjingle/xmpp/xmpp.gyp +++ b/webrtc/libjingle/xmpp/xmpp.gyp @@ -13,7 +13,7 @@ 'target_name': 'rtc_xmpp', 'type': 'static_library', 'dependencies': [ - '<(webrtc_root)/base/base.gyp:webrtc_base', + '<(webrtc_root)/base/base.gyp:rtc_base', '<(webrtc_root)/libjingle/xmllite/xmllite.gyp:rtc_xmllite', '<(DEPTH)/third_party/expat/expat.gyp:expat', ], @@ -138,4 +138,4 @@ ], }], } - + diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index ce62ee4f18..1418bdc1ae 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -141,6 +141,7 @@ source_set("audio_device") { libs = [ "AudioToolbox.framework", "AVFoundation.framework", + "Foundation.framework", ] } if (is_win) { diff --git a/webrtc/modules/audio_device/audio_device.gypi b/webrtc/modules/audio_device/audio_device.gypi index 76eb38a4a3..1681fca52c 100644 --- a/webrtc/modules/audio_device/audio_device.gypi +++ b/webrtc/modules/audio_device/audio_device.gypi @@ -192,6 +192,7 @@ 'OTHER_LDFLAGS': [ '-framework AudioToolbox', '-framework AVFoundation', + '-framework Foundation', ], }, }, diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index eaaeaa8636..969ce8a084 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -178,12 +178,6 @@ source_set("webrtc_vp8") { "//third_party/libvpx", ] } - if (rtc_build_libyuv) { - deps += [ "//third_party/libyuv" ] - } else { - # Need to add a directory normally exported by libyuv. - include_dirs += [ "//third_party/libyuv/include" ] - } } source_set("webrtc_vp9") { diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8.gyp b/webrtc/modules/video_coding/codecs/vp8/vp8.gyp index 504d4b844f..63cc854b2d 100644 --- a/webrtc/modules/video_coding/codecs/vp8/vp8.gyp +++ b/webrtc/modules/video_coding/codecs/vp8/vp8.gyp @@ -48,9 +48,6 @@ 'msvs_disabled_warnings': [ 4267, # size_t to int truncation. ], - 'include_dirs': [ - '<(libyuv_dir)/include', - ], }, ], # targets 'conditions': [ diff --git a/webrtc/p2p/p2p.gyp b/webrtc/p2p/p2p.gyp index 4de6b216c3..3f093766c8 100644 --- a/webrtc/p2p/p2p.gyp +++ b/webrtc/p2p/p2p.gyp @@ -13,7 +13,7 @@ 'target_name': 'rtc_p2p', 'type': 'static_library', 'dependencies': [ - '<(webrtc_root)/base/base.gyp:webrtc_base', + '<(webrtc_root)/base/base.gyp:rtc_base', ], 'cflags_cc!': [ '-Wnon-virtual-dtor', @@ -113,4 +113,4 @@ ], }], } - + diff --git a/webrtc/tools/converter/converter.h b/webrtc/tools/converter/converter.h index ce21c95db9..a23d5a14d4 100644 --- a/webrtc/tools/converter/converter.h +++ b/webrtc/tools/converter/converter.h @@ -13,8 +13,8 @@ #include -#include "third_party/libyuv/include/libyuv/compare.h" -#include "third_party/libyuv/include/libyuv/convert.h" +#include "libyuv/compare.h" // NOLINT +#include "libyuv/convert.h" // NOLINT namespace webrtc { namespace test { diff --git a/webrtc/tools/frame_analyzer/video_quality_analysis.h b/webrtc/tools/frame_analyzer/video_quality_analysis.h index 31064a28f8..4704a8cde9 100644 --- a/webrtc/tools/frame_analyzer/video_quality_analysis.h +++ b/webrtc/tools/frame_analyzer/video_quality_analysis.h @@ -14,8 +14,8 @@ #include #include -#include "third_party/libyuv/include/libyuv/compare.h" -#include "third_party/libyuv/include/libyuv/convert.h" +#include "libyuv/compare.h" // NOLINT +#include "libyuv/convert.h" // NOLINT namespace webrtc { namespace test { diff --git a/webrtc/tools/tools.gyp b/webrtc/tools/tools.gyp index 7e90511f64..0a3d5313dc 100644 --- a/webrtc/tools/tools.gyp +++ b/webrtc/tools/tools.gyp @@ -15,10 +15,10 @@ 'target_name': 'video_quality_analysis', 'type': 'static_library', 'dependencies': [ - '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv', + '<(webrtc_root)/common_video/common_video.gyp:common_video', ], 'export_dependent_settings': [ - '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv', + '<(webrtc_root)/common_video/common_video.gyp:common_video', ], 'sources': [ 'frame_analyzer/video_quality_analysis.h', @@ -51,8 +51,8 @@ 'target_name': 'rgba_to_i420_converter', 'type': 'executable', 'dependencies': [ + '<(webrtc_root)/common_video/common_video.gyp:common_video', '<(webrtc_root)/tools/internal_tools.gyp:command_line_parser', - '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv', ], 'sources': [ 'converter/converter.h', diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn index 3666bd532b..54da9ad3fc 100644 --- a/webrtc/voice_engine/BUILD.gn +++ b/webrtc/voice_engine/BUILD.gn @@ -11,9 +11,6 @@ import("../build/webrtc.gni") source_set("voice_engine") { sources = [ - "../common_types.h", - "../engine_configurations.h", - "../typedefs.h", "include/voe_audio_processing.h", "include/voe_base.h", "include/voe_codec.h", diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp index 13c4754a3a..3ec870dca9 100644 --- a/webrtc/voice_engine/voice_engine.gyp +++ b/webrtc/voice_engine/voice_engine.gyp @@ -27,9 +27,6 @@ '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', ], 'sources': [ - '../common_types.h', - '../engine_configurations.h', - '../typedefs.h', 'include/voe_audio_processing.h', 'include/voe_base.h', 'include/voe_codec.h', diff --git a/webrtc/webrtc.gyp b/webrtc/webrtc.gyp index 10bc3e7588..a1ab82794e 100644 --- a/webrtc/webrtc.gyp +++ b/webrtc/webrtc.gyp @@ -31,6 +31,7 @@ 'modules/modules.gyp:*', 'p2p/p2p.gyp:*', 'system_wrappers/system_wrappers.gyp:*', + 'tools/tools.gyp:*', 'video_engine/video_engine.gyp:*', 'voice_engine/voice_engine.gyp:*', '<(webrtc_vp8_dir)/vp8.gyp:*', @@ -53,7 +54,6 @@ 'test/metrics.gyp:*', 'test/test.gyp:*', 'test/webrtc_test_common.gyp:webrtc_test_common_unittests', - 'tools/tools.gyp:*', 'webrtc_tests', 'rtc_unittests', ],