Upstream version 9.38.198.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   },
13   'targets': [
14     {
15       'target_name': 'libyuv_unittest',
16       'type': 'executable',
17       'dependencies': [
18         'libyuv.gyp:libyuv',
19         # The tests are based on gtest
20         'testing/gtest.gyp:gtest',
21         'testing/gtest.gyp:gtest_main',
22       ],
23       'defines': [
24         'LIBYUV_SVNREVISION="<!(svnversion -n)"',
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         ['OS=="linux"', {
53           'cflags': [
54             '-fexceptions',
55           ],
56         }],
57         [ 'OS == "ios" and target_subarch == 64', {
58           'defines': [
59             'LIBYUV_DISABLE_NEON'
60           ],
61         }],
62         [ 'OS == "ios"', {
63           'xcode_settings': {
64             'DEBUGGING_SYMBOLS': 'YES',
65             'DEBUG_INFORMATION_FORMAT' : 'dwarf-with-dsym',
66           },
67         }],
68         [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
69           'defines': [
70             'HAVE_JPEG',
71           ],
72         }],
73       ], # conditions
74     },
75
76     {
77       'target_name': 'compare',
78       'type': 'executable',
79       'dependencies': [
80         'libyuv.gyp:libyuv',
81       ],
82       'sources': [
83         # sources
84         'util/compare.cc',
85       ],
86       'conditions': [
87         ['OS=="linux"', {
88           'cflags': [
89             '-fexceptions',
90           ],
91         }],
92       ], # conditions
93     },
94     {
95       'target_name': 'convert',
96       'type': 'executable',
97       'dependencies': [
98         'libyuv.gyp:libyuv',
99       ],
100       'sources': [
101         # sources
102         'util/convert.cc',
103       ],
104       'conditions': [
105         ['OS=="linux"', {
106           'cflags': [
107             '-fexceptions',
108           ],
109         }],
110       ], # conditions
111     },
112     # TODO(fbarchard): Enable SSE2 and OpenMP for better performance.
113     {
114       'target_name': 'psnr',
115       'type': 'executable',
116       'sources': [
117         # sources
118         'util/psnr_main.cc',
119         'util/psnr.cc',
120         'util/ssim.cc',
121       ],
122       'dependencies': [
123         'libyuv.gyp:libyuv',
124       ],
125       'conditions': [
126         [ 'OS == "ios" and target_subarch == 64', {
127           'defines': [
128             'LIBYUV_DISABLE_NEON'
129           ],
130         }],
131
132         [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
133           'defines': [
134             'HAVE_JPEG',
135           ],
136         }],
137       ], # conditions
138     },
139
140     {
141       'target_name': 'cpuid',
142       'type': 'executable',
143       'sources': [
144         # sources
145         'util/cpuid.c',
146       ],
147       'dependencies': [
148         'libyuv.gyp:libyuv',
149       ],
150     },
151   ], # targets
152 }
153
154 # Local Variables:
155 # tab-width:2
156 # indent-tabs-mode:nil
157 # End:
158 # vim: set expandtab tabstop=2 shiftwidth=2: