blob: f4d9ceb17c14f818f9501f665f891e84a35c849d [file] [log] [blame]
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +00001# Copyright (c) 2012 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{
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000010 'includes': ['../build/common.gypi'],
11 'targets': [
12 {
13 'target_name': 'common_video',
14 'type': 'static_library',
15 'include_dirs': [
16 '<(webrtc_root)/modules/interface/',
17 'interface',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000018 'libyuv/include',
19 ],
mikhal@webrtc.org3bbed742012-10-24 18:33:04 +000020 'dependencies': [
21 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
22 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000023 'direct_dependent_settings': {
24 'include_dirs': [
25 'interface',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000026 'libyuv/include',
27 ],
28 },
29 'conditions': [
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000030 ['build_libyuv==1', {
31 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',],
32 }, {
33 # Need to add a directory normally exported by libyuv.gyp.
34 'include_dirs': ['<(libyuv_dir)/include',],
35 }],
36 ],
37 'sources': [
38 'interface/i420_video_frame.h',
wuchengli@chromium.orgc5e70b02013-08-13 05:53:38 +000039 'interface/native_handle.h',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000040 'interface/texture_video_frame.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000041 'i420_video_frame.cc',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000042 'libyuv/include/webrtc_libyuv.h',
43 'libyuv/include/scaler.h',
44 'libyuv/webrtc_libyuv.cc',
45 'libyuv/scaler.cc',
46 'plane.h',
47 'plane.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000048 'texture_video_frame.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000049 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000050 },
51 ], # targets
52 'conditions': [
53 ['include_tests==1', {
54 'targets': [
55 {
andresp@webrtc.org28631e72013-09-19 12:14:03 +000056 'target_name': 'frame_generator',
57 'type': 'static_library',
58 'sources': [
59 'test/frame_generator.h',
60 'test/frame_generator.cc',
61 ],
62 'dependencies': [
63 'common_video',
64 ],
65 },
66 {
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000067 'target_name': 'common_video_unittests',
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000068 'type': '<(gtest_target_type)',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000069 'dependencies': [
70 'common_video',
71 '<(DEPTH)/testing/gtest.gyp:gtest',
72 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
73 '<(webrtc_root)/test/test.gyp:test_support_main',
74 ],
75 'sources': [
76 'i420_video_frame_unittest.cc',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000077 'libyuv/libyuv_unittest.cc',
78 'libyuv/scaler_unittest.cc',
79 'plane_unittest.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000080 'texture_video_frame_unittest.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000081 ],
kjellander@webrtc.org1e7f77a2013-02-04 10:07:17 +000082 # Disable warnings to enable Win64 build, issue 1323.
83 'msvs_disabled_warnings': [
84 4267, # size_t to int truncation.
85 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000086 'conditions': [
87 # TODO(henrike): remove build_with_chromium==1 when the bots are
88 # using Chromium's buildbots.
89 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
90 'dependencies': [
91 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
92 ],
93 }],
94 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000095 },
96 ], # targets
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000097 'conditions': [
98 # TODO(henrike): remove build_with_chromium==1 when the bots are using
99 # Chromium's buildbots.
100 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
101 'targets': [
102 {
103 'target_name': 'common_video_unittests_apk_target',
104 'type': 'none',
105 'dependencies': [
106 '<(apk_tests_path):common_video_unittests_apk',
107 ],
108 },
109 ],
110 }],
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000111 ['test_isolation_mode != "noop"', {
112 'targets': [
113 {
114 'target_name': 'common_video_unittests_run',
115 'type': 'none',
116 'dependencies': [
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000117 'common_video_unittests',
118 ],
119 'includes': [
kjellander@webrtc.org22a28932013-10-02 19:31:16 +0000120 '../build/isolate.gypi',
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000121 'common_video_unittests.isolate',
122 ],
123 'sources': [
124 'common_video_unittests.isolate',
125 ],
126 },
127 ],
128 }],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000129 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000130 }], # include_tests
131 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000132}