blob: f92563a927a9a55fb9d8d54da4d3d7ed0175b412 [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{
10 'variables': {
11 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
12 'conditions': [
13 ['use_libjpeg_turbo==1', {
14 'libjpeg_include_dir%': [ '<(DEPTH)/third_party/libjpeg_turbo', ],
15 }, {
16 'libjpeg_include_dir%': [ '<(DEPTH)/third_party/libjpeg', ],
17 }],
18 ],
19 },
20 'includes': ['../build/common.gypi'],
21 'targets': [
22 {
23 'target_name': 'common_video',
24 'type': 'static_library',
25 'include_dirs': [
26 '<(webrtc_root)/modules/interface/',
27 'interface',
28 'jpeg/include',
29 'libyuv/include',
30 ],
mikhal@webrtc.org3bbed742012-10-24 18:33:04 +000031 'dependencies': [
32 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
33 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000034 'direct_dependent_settings': {
35 'include_dirs': [
36 'interface',
37 'jpeg/include',
38 'libyuv/include',
39 ],
40 },
41 'conditions': [
42 ['build_libjpeg==1', {
43 'dependencies': ['<(libjpeg_gyp_path):libjpeg',],
44 }, {
45 # Need to add a directory normally exported by libjpeg.gyp.
46 'include_dirs': ['<(libjpeg_include_dir)'],
47 }],
48 ['build_libyuv==1', {
49 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',],
50 }, {
51 # Need to add a directory normally exported by libyuv.gyp.
52 'include_dirs': ['<(libyuv_dir)/include',],
53 }],
54 ],
55 'sources': [
56 'interface/i420_video_frame.h',
wuchengli@chromium.orgc5e70b02013-08-13 05:53:38 +000057 'interface/native_handle.h',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000058 'interface/texture_video_frame.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000059 'i420_video_frame.cc',
60 'jpeg/include/jpeg.h',
61 'jpeg/data_manager.cc',
62 'jpeg/data_manager.h',
63 'jpeg/jpeg.cc',
64 'libyuv/include/webrtc_libyuv.h',
65 'libyuv/include/scaler.h',
66 'libyuv/webrtc_libyuv.cc',
67 'libyuv/scaler.cc',
68 'plane.h',
69 'plane.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000070 'texture_video_frame.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000071 ],
andrew@webrtc.org2be6c3e2013-01-29 06:45:22 +000072 # Silence jpeg struct padding warnings.
73 'msvs_disabled_warnings': [ 4324, ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000074 },
75 ], # targets
76 'conditions': [
77 ['include_tests==1', {
78 'targets': [
79 {
80 'target_name': 'common_video_unittests',
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000081 'type': '<(gtest_target_type)',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000082 'dependencies': [
83 'common_video',
84 '<(DEPTH)/testing/gtest.gyp:gtest',
85 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
86 '<(webrtc_root)/test/test.gyp:test_support_main',
87 ],
88 'sources': [
89 'i420_video_frame_unittest.cc',
90 'jpeg/jpeg_unittest.cc',
91 'libyuv/libyuv_unittest.cc',
92 'libyuv/scaler_unittest.cc',
93 'plane_unittest.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000094 'texture_video_frame_unittest.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000095 ],
kjellander@webrtc.org1e7f77a2013-02-04 10:07:17 +000096 # Disable warnings to enable Win64 build, issue 1323.
97 'msvs_disabled_warnings': [
98 4267, # size_t to int truncation.
99 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000100 'conditions': [
101 # TODO(henrike): remove build_with_chromium==1 when the bots are
102 # using Chromium's buildbots.
103 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
104 'dependencies': [
105 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
106 ],
107 }],
108 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000109 },
110 ], # targets
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000111 'conditions': [
112 # TODO(henrike): remove build_with_chromium==1 when the bots are using
113 # Chromium's buildbots.
114 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
115 'targets': [
116 {
117 'target_name': 'common_video_unittests_apk_target',
118 'type': 'none',
119 'dependencies': [
120 '<(apk_tests_path):common_video_unittests_apk',
121 ],
122 },
123 ],
124 }],
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000125 ['test_isolation_mode != "noop"', {
126 'targets': [
127 {
128 'target_name': 'common_video_unittests_run',
129 'type': 'none',
130 'dependencies': [
131 '<(import_isolate_path):import_isolate_gypi',
132 'common_video_unittests',
133 ],
134 'includes': [
135 'common_video_unittests.isolate',
136 ],
137 'sources': [
138 'common_video_unittests.isolate',
139 ],
140 },
141 ],
142 }],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000143 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000144 }], # include_tests
145 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000146}