blob: f8b7124764e37d13525dc157841104eabbca6a3e [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',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000057 'interface/texture_video_frame.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000058 'i420_video_frame.cc',
59 'jpeg/include/jpeg.h',
60 'jpeg/data_manager.cc',
61 'jpeg/data_manager.h',
62 'jpeg/jpeg.cc',
63 'libyuv/include/webrtc_libyuv.h',
64 'libyuv/include/scaler.h',
65 'libyuv/webrtc_libyuv.cc',
66 'libyuv/scaler.cc',
67 'plane.h',
68 'plane.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000069 'texture_video_frame.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000070 ],
andrew@webrtc.org2be6c3e2013-01-29 06:45:22 +000071 # Silence jpeg struct padding warnings.
72 'msvs_disabled_warnings': [ 4324, ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000073 },
74 ], # targets
75 'conditions': [
76 ['include_tests==1', {
77 'targets': [
78 {
79 'target_name': 'common_video_unittests',
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000080 'type': '<(gtest_target_type)',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000081 'dependencies': [
82 'common_video',
83 '<(DEPTH)/testing/gtest.gyp:gtest',
84 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
85 '<(webrtc_root)/test/test.gyp:test_support_main',
86 ],
87 'sources': [
88 'i420_video_frame_unittest.cc',
89 'jpeg/jpeg_unittest.cc',
90 'libyuv/libyuv_unittest.cc',
91 'libyuv/scaler_unittest.cc',
92 'plane_unittest.cc',
wu@webrtc.orgea7b33e2013-08-05 20:36:57 +000093 'texture_video_frame_unittest.cc'
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000094 ],
kjellander@webrtc.org1e7f77a2013-02-04 10:07:17 +000095 # Disable warnings to enable Win64 build, issue 1323.
96 'msvs_disabled_warnings': [
97 4267, # size_t to int truncation.
98 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +000099 'conditions': [
100 # TODO(henrike): remove build_with_chromium==1 when the bots are
101 # using Chromium's buildbots.
102 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
103 'dependencies': [
104 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
105 ],
106 }],
107 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000108 },
109 ], # targets
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000110 'conditions': [
111 # TODO(henrike): remove build_with_chromium==1 when the bots are using
112 # Chromium's buildbots.
113 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
114 'targets': [
115 {
116 'target_name': 'common_video_unittests_apk_target',
117 'type': 'none',
118 'dependencies': [
119 '<(apk_tests_path):common_video_unittests_apk',
120 ],
121 },
122 ],
123 }],
124 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000125 }], # include_tests
126 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000127}