niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | # Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | { |
| 10 | 'includes': [ |
| 11 | '../../../common_settings.gypi', |
| 12 | ], |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 13 | 'variables': { |
| 14 | 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', |
| 15 | }, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | 'targets': [ |
| 17 | { |
| 18 | 'target_name': 'unit_test', |
| 19 | 'type': 'executable', |
ajm@google.com | 59e4140 | 2011-07-28 17:34:04 +0000 | [diff] [blame] | 20 | 'conditions': [ |
| 21 | ['prefer_fixed_point==1', { |
| 22 | 'defines': ['WEBRTC_APM_UNIT_TEST_FIXED_PROFILE'], |
| 23 | }, { |
| 24 | 'defines': ['WEBRTC_APM_UNIT_TEST_FLOAT_PROFILE'], |
| 25 | }], |
| 26 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 27 | 'dependencies': [ |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 28 | 'apm_unittest_proto', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 29 | 'source/apm.gyp:audio_processing', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 30 | '../../../common_audio/signal_processing_library/main/source/spl.gyp:spl', |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 31 | '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 32 | '../../../../testing/gtest.gyp:gtest', |
| 33 | '../../../../testing/gtest.gyp:gtest_main', |
| 34 | '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', |
| 35 | ], |
| 36 | 'include_dirs': [ |
| 37 | '../../../../testing/gtest/include', |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 38 | '<(protoc_out_dir)', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 39 | ], |
| 40 | 'sources': [ |
| 41 | 'test/unit_test/unit_test.cc', |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 42 | '<(protoc_out_dir)/audio_processing_unittest.pb.cc', |
| 43 | '<(protoc_out_dir)/audio_processing_unittest.pb.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 44 | ], |
| 45 | }, |
| 46 | { |
ajm@google.com | f8dc8dc | 2011-07-29 17:29:08 +0000 | [diff] [blame^] | 47 | # Protobuf compiler / generate rule for unit_test |
| 48 | 'target_name': 'apm_unittest_proto', |
| 49 | 'type': 'none', |
| 50 | 'variables': { |
| 51 | 'proto_relpath': 'test/unit_test', |
| 52 | }, |
| 53 | 'sources': [ |
| 54 | '<(proto_relpath)/audio_processing_unittest.proto', |
| 55 | ], |
| 56 | 'rules': [ |
| 57 | { |
| 58 | 'rule_name': 'genproto', |
| 59 | 'extension': 'proto', |
| 60 | 'inputs': [ |
| 61 | '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', |
| 62 | ], |
| 63 | 'outputs': [ |
| 64 | '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.cc', |
| 65 | '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.h', |
| 66 | ], |
| 67 | 'action': [ |
| 68 | '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', |
| 69 | '--proto_path=<(proto_relpath)', |
| 70 | '<(proto_relpath)/<(RULE_INPUT_NAME)', |
| 71 | '--cpp_out=<(protoc_out_dir)', |
| 72 | ], |
| 73 | 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', |
| 74 | }, |
| 75 | ], |
| 76 | 'dependencies': [ |
| 77 | '../../../../third_party/protobuf/protobuf.gyp:protoc#host', |
| 78 | ], |
| 79 | # This target exports a hard dependency because it generates header |
| 80 | # files. |
| 81 | 'hard_dependency': 1, |
| 82 | }, |
| 83 | { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 84 | 'target_name': 'process_test', |
| 85 | 'type': 'executable', |
| 86 | 'dependencies': [ |
| 87 | 'source/apm.gyp:audio_processing', |
| 88 | '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 89 | '../../../../testing/gtest.gyp:gtest', |
| 90 | '../../../../testing/gtest.gyp:gtest_main', |
| 91 | ], |
| 92 | 'include_dirs': [ |
| 93 | '../../../../testing/gtest/include', |
| 94 | ], |
| 95 | 'sources': [ |
| 96 | 'test/process_test/process_test.cc', |
| 97 | ], |
| 98 | }, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 99 | ], |
| 100 | } |
| 101 | |
| 102 | # Local Variables: |
| 103 | # tab-width:2 |
| 104 | # indent-tabs-mode:nil |
| 105 | # End: |
| 106 | # vim: set expandtab tabstop=2 shiftwidth=2: |