Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / libyuv / libyuv_test.gyp
1 # Copyright 2011 The LibYuv 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     'libyuv_disable_jpeg%': 0,
12     'libyuv_enable_svn%': 0,
13   },
14   'targets': [
15     {
16       'target_name': 'libyuv_unittest',
17       'type': 'executable',
18       'dependencies': [
19         'libyuv.gyp:libyuv',
20         # The tests are based on gtest
21         'testing/gtest.gyp:gtest',
22         'testing/gtest.gyp:gtest_main',
23       ],
24       'defines': [
25         # Enable the following 3 macros to turn off assembly for specified CPU.
26         # 'LIBYUV_DISABLE_X86',
27         # 'LIBYUV_DISABLE_NEON',
28         # 'LIBYUV_DISABLE_MIPS',
29         # Enable the following macro to build libyuv as a shared library (dll).
30         # 'LIBYUV_USING_SHARED_LIBRARY',
31       ],
32       'sources': [
33         # headers
34         'unit_test/unit_test.h',
35
36         # sources
37         'unit_test/basictypes_test.cc',
38         'unit_test/compare_test.cc',
39         'unit_test/convert_test.cc',
40         'unit_test/cpu_test.cc',
41         'unit_test/math_test.cc',
42         'unit_test/planar_test.cc',
43         'unit_test/rotate_argb_test.cc',
44         'unit_test/rotate_test.cc',
45         'unit_test/scale_argb_test.cc',
46         'unit_test/scale_test.cc',
47         'unit_test/unit_test.cc',
48         'unit_test/video_common_test.cc',
49         'unit_test/version_test.cc',
50       ],
51       'conditions': [
52         [ 'libyuv_enable_svn == 1', {
53           'defines': [
54             'LIBYUV_SVNREVISION="<!(svnversion -n)"',
55           ],
56         }],
57         ['OS=="linux"', {
58           'cflags': [
59             '-fexceptions',
60           ],
61         }],
62         [ 'OS == "ios" and target_subarch == 64', {
63           'defines': [
64             'LIBYUV_DISABLE_NEON'
65           ],
66         }],
67         [ 'OS == "ios"', {
68           'xcode_settings': {
69             'DEBUGGING_SYMBOLS': 'YES',
70             'DEBUG_INFORMATION_FORMAT' : 'dwarf-with-dsym',
71           },
72         }],
73         [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
74           'defines': [
75             'HAVE_JPEG',
76           ],
77         }],
78       ], # conditions
79     },
80
81     {
82       'target_name': 'compare',
83       'type': 'executable',
84       'dependencies': [
85         'libyuv.gyp:libyuv',
86       ],
87       'sources': [
88         # sources
89         'util/compare.cc',
90       ],
91       'conditions': [
92         ['OS=="linux"', {
93           'cflags': [
94             '-fexceptions',
95           ],
96         }],
97       ], # conditions
98     },
99     {
100       'target_name': 'convert',
101       'type': 'executable',
102       'dependencies': [
103         'libyuv.gyp:libyuv',
104       ],
105       'sources': [
106         # sources
107         'util/convert.cc',
108       ],
109       'conditions': [
110         ['OS=="linux"', {
111           'cflags': [
112             '-fexceptions',
113           ],
114         }],
115       ], # conditions
116     },
117     # TODO(fbarchard): Enable SSE2 and OpenMP for better performance.
118     {
119       'target_name': 'psnr',
120       'type': 'executable',
121       'sources': [
122         # sources
123         'util/psnr_main.cc',
124         'util/psnr.cc',
125         'util/ssim.cc',
126       ],
127       'dependencies': [
128         'libyuv.gyp:libyuv',
129       ],
130       'conditions': [
131         [ 'OS == "ios" and target_subarch == 64', {
132           'defines': [
133             'LIBYUV_DISABLE_NEON'
134           ],
135         }],
136
137         [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
138           'defines': [
139             'HAVE_JPEG',
140           ],
141         }],
142       ], # conditions
143     },
144
145     {
146       'target_name': 'cpuid',
147       'type': 'executable',
148       'sources': [
149         # sources
150         'util/cpuid.c',
151       ],
152       'dependencies': [
153         'libyuv.gyp:libyuv',
154       ],
155     },
156   ], # targets
157 }
158
159 # Local Variables:
160 # tab-width:2
161 # indent-tabs-mode:nil
162 # End:
163 # vim: set expandtab tabstop=2 shiftwidth=2: