blob: d8f2a3f5697e8bafdb531ebd2949da00ff3814dc [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',
57 'i420_video_frame.cc',
58 'jpeg/include/jpeg.h',
59 'jpeg/data_manager.cc',
60 'jpeg/data_manager.h',
61 'jpeg/jpeg.cc',
62 'libyuv/include/webrtc_libyuv.h',
63 'libyuv/include/scaler.h',
64 'libyuv/webrtc_libyuv.cc',
65 'libyuv/scaler.cc',
66 'plane.h',
67 'plane.cc',
68 ],
69 },
70 ], # targets
71 'conditions': [
72 ['include_tests==1', {
73 'targets': [
74 {
75 'target_name': 'common_video_unittests',
76 'type': 'executable',
77 'dependencies': [
78 'common_video',
79 '<(DEPTH)/testing/gtest.gyp:gtest',
80 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
81 '<(webrtc_root)/test/test.gyp:test_support_main',
82 ],
83 'sources': [
84 'i420_video_frame_unittest.cc',
85 'jpeg/jpeg_unittest.cc',
86 'libyuv/libyuv_unittest.cc',
87 'libyuv/scaler_unittest.cc',
88 'plane_unittest.cc',
89 ],
90 },
91 ], # targets
92 }], # include_tests
93 ],
94}