From cab716cc7db7b1d4fe336cba0a8937740a14f485 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Tue, 9 Jul 2013 13:43:24 +0000 Subject: [PATCH] Fix a circular dependency by removing an unnecessary dependency, add a missing include_tests check and missing lib references for android. TBR=henrikg@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1776005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4312 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../remote_bitrate_estimator_components.gyp | 32 +++++++++++-------- .../video_engine/test/android/jni/Android.mk | 7 ++++ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_components.gyp b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_components.gyp index c23c30ca6b..25973ccec1 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_components.gyp +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_components.gyp @@ -18,8 +18,6 @@ '<(webrtc_root)/modules/remote_bitrate_estimator', ], 'sources': [ - 'bitrate_estimator.cc', - 'bitrate_estimator.h', 'overuse_detector.cc', 'overuse_detector.h', 'remote_bitrate_estimator_single_stream.cc', @@ -27,19 +25,25 @@ 'remote_rate_control.h', ], }, - { - 'target_name': 'rbe_components_unittests', - 'type': 'static_library', - 'dependencies': [ - '<(DEPTH)/testing/gmock.gyp:gmock', - '<(DEPTH)/testing/gtest.gyp:gtest', - '<(webrtc_root)/modules/modules.gyp:remote_bitrate_estimator', - ], - 'sources': [ - '<(rbe_components_path)/remote_bitrate_estimator_single_stream_unittest.cc', - '<(rbe_components_path)/remote_bitrate_estimator_unittest_helper.cc', - '<(rbe_components_path)/remote_bitrate_estimator_unittest_helper.h', + ], + 'conditions': [ + ['include_tests==1', { + 'targets': [ + { + 'target_name': 'rbe_components_unittests', + 'type': 'static_library', + 'dependencies': [ + '<(DEPTH)/testing/gmock.gyp:gmock', + '<(DEPTH)/testing/gtest.gyp:gtest', + ], + 'sources': [ + '<(rbe_components_path)/remote_bitrate_estimator_single_stream_unittest.cc', + '<(rbe_components_path)/remote_bitrate_estimator_unittest_helper.cc', + '<(rbe_components_path)/remote_bitrate_estimator_unittest_helper.h', + ], + }, ], }, + ], ], } diff --git a/webrtc/video_engine/test/android/jni/Android.mk b/webrtc/video_engine/test/android/jni/Android.mk index 5e6cd0b373..7b3f3a8f07 100644 --- a/webrtc/video_engine/test/android/jni/Android.mk +++ b/webrtc/video_engine/test/android/jni/Android.mk @@ -170,6 +170,12 @@ LOCAL_SRC_FILES := \ $(MY_LIBS_PATH)/libremote_bitrate_estimator.a include $(PREBUILT_STATIC_LIBRARY) +include $(CLEAR_VARS) +LOCAL_MODULE := librbe_components +LOCAL_SRC_FILES := \ + $(MY_LIBS_PATH)/librbe_components.a +include $(PREBUILT_STATIC_LIBRARY) + include $(CLEAR_VARS) LOCAL_MODULE := librtp_rtcp LOCAL_SRC_FILES := \ @@ -384,6 +390,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \ libcpu_features_android \ libaudio_device \ libremote_bitrate_estimator \ + librbe_components \ librtp_rtcp \ libmedia_file \ libchannel_transport \