blob: 87e7a5bb11c3ac137a084911f1ca9142fd46fbe9 [file] [log] [blame]
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -08001# 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
Hangyu Kuangf047e7c2016-07-06 14:21:45 -07006# in the file PATENTS. All contributing project authors may
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -08007# be found in the AUTHORS file in the root of the source tree.
8
9{
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070010 'variables': {
Frank Barchardb83bb382017-02-22 18:01:07 -080011 # Can be enabled if your jpeg has GYP support.
12 'libyuv_disable_jpeg%': 1,
13 'mips_msa%': 0, # Default to msa off.
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070014 },
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080015 'targets': [
16 {
17 'target_name': 'libyuv_unittest',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070018 'type': '<(gtest_target_type)',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080019 'dependencies': [
20 'libyuv.gyp:libyuv',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080021 'testing/gtest.gyp:gtest',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070022 'third_party/gflags/gflags.gyp:gflags',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080023 ],
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070024 'direct_dependent_settings': {
25 'defines': [
26 'GTEST_RELATIVE_PATH',
27 ],
28 },
29 'export_dependent_settings': [
30 '<(DEPTH)/testing/gtest.gyp:gtest',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080031 ],
32 'sources': [
33 # headers
34 'unit_test/unit_test.h',
35
36 # sources
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070037 'unit_test/basictypes_test.cc',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080038 'unit_test/compare_test.cc',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070039 'unit_test/color_test.cc',
40 'unit_test/convert_test.cc',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080041 'unit_test/cpu_test.cc',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070042 'unit_test/math_test.cc',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080043 'unit_test/planar_test.cc',
44 'unit_test/rotate_argb_test.cc',
45 'unit_test/rotate_test.cc',
46 'unit_test/scale_argb_test.cc',
47 'unit_test/scale_test.cc',
48 'unit_test/unit_test.cc',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070049 'unit_test/video_common_test.cc',
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080050 ],
51 'conditions': [
52 ['OS=="linux"', {
53 'cflags': [
54 '-fexceptions',
55 ],
56 }],
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070057 [ 'OS == "ios"', {
58 'xcode_settings': {
59 'DEBUGGING_SYMBOLS': 'YES',
60 'DEBUG_INFORMATION_FORMAT' : 'dwarf-with-dsym',
61 # Work around compile issue with isosim.mm, see
62 # https://code.google.com/p/libyuv/issues/detail?id=548 for details.
63 'WARNING_CFLAGS': [
64 '-Wno-sometimes-uninitialized',
65 ],
66 },
67 'cflags': [
68 '-Wno-sometimes-uninitialized',
69 ],
70 }],
71 [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
72 'defines': [
73 'HAVE_JPEG',
74 ],
75 }],
76 ['OS=="android"', {
77 'dependencies': [
78 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
79 ],
80 }],
81 # TODO(YangZhang): These lines can be removed when high accuracy
82 # YUV to RGB to Neon is ported.
83 [ '(target_arch == "armv7" or target_arch == "armv7s" \
84 or (target_arch == "arm" and arm_version >= 7) \
85 or target_arch == "arm64") \
86 and (arm_neon == 1 or arm_neon_optional == 1)', {
87 'defines': [
88 'LIBYUV_NEON'
89 ],
90 }],
Frank Barchardb83bb382017-02-22 18:01:07 -080091 [ '(target_arch == "mipsel" or target_arch == "mips64el") \
92 and (mips_msa == 1)', {
93 'defines': [
94 'LIBYUV_MSA'
95 ],
96 }],
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -080097 ], # conditions
Hangyu Kuangf047e7c2016-07-06 14:21:45 -070098 'defines': [
99 # Enable the following 3 macros to turn off assembly for specified CPU.
100 # 'LIBYUV_DISABLE_X86',
101 # 'LIBYUV_DISABLE_NEON',
Frank Barchardb83bb382017-02-22 18:01:07 -0800102 # 'LIBYUV_DISABLE_DSPR2',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700103 # Enable the following macro to build libyuv as a shared library (dll).
104 # 'LIBYUV_USING_SHARED_LIBRARY',
105 ],
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -0800106 },
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -0800107 {
108 'target_name': 'compare',
109 'type': 'executable',
110 'dependencies': [
111 'libyuv.gyp:libyuv',
112 ],
113 'sources': [
114 # sources
115 'util/compare.cc',
116 ],
117 'conditions': [
118 ['OS=="linux"', {
119 'cflags': [
120 '-fexceptions',
121 ],
122 }],
123 ], # conditions
124 },
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700125 {
Frank Barchardb33a82f2017-04-18 11:28:09 -0700126 'target_name': 'yuvconvert',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700127 'type': 'executable',
128 'dependencies': [
129 'libyuv.gyp:libyuv',
130 ],
131 'sources': [
132 # sources
Frank Barchardb33a82f2017-04-18 11:28:09 -0700133 'util/yuvconvert.cc',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700134 ],
135 'conditions': [
136 ['OS=="linux"', {
137 'cflags': [
138 '-fexceptions',
139 ],
140 }],
141 ], # conditions
142 },
143 # TODO(fbarchard): Enable SSE2 and OpenMP for better performance.
144 {
145 'target_name': 'psnr',
146 'type': 'executable',
147 'sources': [
148 # sources
149 'util/psnr_main.cc',
150 'util/psnr.cc',
151 'util/ssim.cc',
152 ],
153 'dependencies': [
154 'libyuv.gyp:libyuv',
155 ],
156 'conditions': [
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700157 [ 'OS != "ios" and libyuv_disable_jpeg != 1', {
158 'defines': [
159 'HAVE_JPEG',
160 ],
161 }],
162 ], # conditions
163 },
164
165 {
166 'target_name': 'cpuid',
167 'type': 'executable',
168 'sources': [
169 # sources
170 'util/cpuid.c',
171 ],
172 'dependencies': [
173 'libyuv.gyp:libyuv',
174 ],
175 },
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -0800176 ], # targets
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700177 'conditions': [
178 ['OS=="android"', {
179 'targets': [
180 {
Frank Barchardb83bb382017-02-22 18:01:07 -0800181 'target_name': 'yuv_unittest_apk',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700182 'type': 'none',
183 'variables': {
Frank Barchardb83bb382017-02-22 18:01:07 -0800184 'test_suite_name': 'yuv_unittest',
185 'input_shlib_path': '<(SHARED_LIB_DIR)/(SHARED_LIB_PREFIX)libyuv_unittest<(SHARED_LIB_SUFFIX)',
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700186 },
187 'includes': [
Frank Barchardb83bb382017-02-22 18:01:07 -0800188 'build/apk_test.gypi',
189 ],
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700190 'dependencies': [
Hangyu Kuangf047e7c2016-07-06 14:21:45 -0700191 'libyuv_unittest',
192 ],
193 },
194 ],
195 }],
196 ],
Hendrik Dahlkamp33cfdeb2013-01-23 18:27:37 -0800197}
198
199# Local Variables:
200# tab-width:2
201# indent-tabs-mode:nil
202# End:
203# vim: set expandtab tabstop=2 shiftwidth=2: