From dd5d804efb0b6fc24b77fa648ce1f4aab9bed19e Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Thu, 13 Mar 2014 00:57:52 +0000 Subject: [PATCH] Disable all protobuf dependent targets when enable_protobuf=0. BUG=3045 TESTED=builds now when enable_protobuf=0 and modules_unittests still includes ApmTest.* when enable_protobuf=1. R=bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/9879004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5690 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_processing_tests.gypi | 28 +++++++++---------- webrtc/modules/modules.gyp | 12 +++++--- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/webrtc/modules/audio_processing/audio_processing_tests.gypi b/webrtc/modules/audio_processing/audio_processing_tests.gypi index 05d7514bd..82aa7fd14 100644 --- a/webrtc/modules/audio_processing/audio_processing_tests.gypi +++ b/webrtc/modules/audio_processing/audio_processing_tests.gypi @@ -7,24 +7,22 @@ # be found in the AUTHORS file in the root of the source tree. { - 'targets': [ - { - 'target_name': 'audioproc_unittest_proto', - 'type': 'static_library', - 'sources': [ 'test/unittest.proto', ], - 'variables': { - 'proto_in_dir': 'test', - # Workaround to protect against gyp's pathname relativization when this - # file is included by modules.gyp. - 'proto_out_protected': 'webrtc/audio_processing', - 'proto_out_dir': '<(proto_out_protected)', - }, - 'includes': [ '../../build/protoc.gypi', ], - }, - ], 'conditions': [ ['enable_protobuf==1', { 'targets': [ + { + 'target_name': 'audioproc_unittest_proto', + 'type': 'static_library', + 'sources': [ 'test/unittest.proto', ], + 'variables': { + 'proto_in_dir': 'test', + # Workaround to protect against gyp's pathname relativization when + # this file is included by modules.gyp. + 'proto_out_protected': 'webrtc/audio_processing', + 'proto_out_dir': '<(proto_out_protected)', + }, + 'includes': [ '../../build/protoc.gypi', ], + }, { 'target_name': 'audioproc', 'type': 'executable', diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index 5d0827cf7..096c04e1e 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -71,7 +71,6 @@ 'dependencies': [ 'audio_coding_module', 'audio_processing', - 'audioproc_unittest_proto', 'bitrate_controller', 'CNG', 'desktop_capture', @@ -155,10 +154,7 @@ 'audio_coding/neteq4/mock/mock_payload_splitter.h', 'audio_processing/aec/system_delay_unittest.cc', 'audio_processing/aec/echo_cancellation_unittest.cc', - 'audio_processing/audio_processing_impl_unittest.cc', 'audio_processing/echo_cancellation_impl_unittest.cc', - 'audio_processing/test/audio_processing_unittest.cc', - 'audio_processing/test/test_utils.h', 'audio_processing/utility/delay_estimator_unittest.cc', 'audio_processing/utility/ring_buffer_unittest.cc', 'bitrate_controller/bitrate_controller_unittest.cc', @@ -285,6 +281,14 @@ }], ['enable_protobuf==1', { 'defines': [ 'WEBRTC_AUDIOPROC_DEBUG_DUMP' ], + 'dependencies': [ + 'audioproc_unittest_proto', + ], + 'sources': [ + 'audio_processing/audio_processing_impl_unittest.cc', + 'audio_processing/test/audio_processing_unittest.cc', + 'audio_processing/test/test_utils.h', + ], }], ['build_libvpx==1', { 'dependencies': [