blob: 10c1ae96ef4d47f08d02ef954534013100cd232e [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001# 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.comf8dc8dc2011-07-29 17:29:08 +000013 'variables': {
14 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
15 },
niklase@google.com470e71d2011-07-07 08:21:25 +000016 'targets': [
17 {
18 'target_name': 'unit_test',
19 'type': 'executable',
ajm@google.com59e41402011-07-28 17:34:04 +000020 '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.com470e71d2011-07-07 08:21:25 +000027 'dependencies': [
ajm@google.comf8dc8dc2011-07-29 17:29:08 +000028 'apm_unittest_proto',
niklase@google.com470e71d2011-07-07 08:21:25 +000029 'source/apm.gyp:audio_processing',
niklase@google.com470e71d2011-07-07 08:21:25 +000030 '../../../common_audio/signal_processing_library/main/source/spl.gyp:spl',
ajm@google.comf8dc8dc2011-07-29 17:29:08 +000031 '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000032 '../../../../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.comf8dc8dc2011-07-29 17:29:08 +000038 '<(protoc_out_dir)',
niklase@google.com470e71d2011-07-07 08:21:25 +000039 ],
40 'sources': [
41 'test/unit_test/unit_test.cc',
ajm@google.comf8dc8dc2011-07-29 17:29:08 +000042 '<(protoc_out_dir)/audio_processing_unittest.pb.cc',
43 '<(protoc_out_dir)/audio_processing_unittest.pb.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000044 ],
45 },
46 {
ajm@google.comf8dc8dc2011-07-29 17:29:08 +000047 # 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.com470e71d2011-07-07 08:21:25 +000084 '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.com470e71d2011-07-07 08:21:25 +000089 '../../../../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.com470e71d2011-07-07 08:21:25 +000099 ],
100}
101
102# Local Variables:
103# tab-width:2
104# indent-tabs-mode:nil
105# End:
106# vim: set expandtab tabstop=2 shiftwidth=2: