Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 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 |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 6 | # in the file PATENTS. All contributing project authors may |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | { |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 10 | 'variables': { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 11 | # Can be enabled if your jpeg has GYP support. |
| 12 | 'libyuv_disable_jpeg%': 1, |
| 13 | 'mips_msa%': 0, # Default to msa off. |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 14 | }, |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 15 | 'targets': [ |
| 16 | { |
| 17 | 'target_name': 'libyuv_unittest', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 18 | 'type': '<(gtest_target_type)', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 19 | 'dependencies': [ |
| 20 | 'libyuv.gyp:libyuv', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 21 | 'testing/gtest.gyp:gtest', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 22 | 'third_party/gflags/gflags.gyp:gflags', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 23 | ], |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 24 | 'direct_dependent_settings': { |
| 25 | 'defines': [ |
| 26 | 'GTEST_RELATIVE_PATH', |
| 27 | ], |
| 28 | }, |
| 29 | 'export_dependent_settings': [ |
| 30 | '<(DEPTH)/testing/gtest.gyp:gtest', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 31 | ], |
| 32 | 'sources': [ |
| 33 | # headers |
| 34 | 'unit_test/unit_test.h', |
| 35 | |
| 36 | # sources |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 37 | 'unit_test/basictypes_test.cc', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 38 | 'unit_test/compare_test.cc', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 39 | 'unit_test/color_test.cc', |
| 40 | 'unit_test/convert_test.cc', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 41 | 'unit_test/cpu_test.cc', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 42 | 'unit_test/math_test.cc', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 43 | '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 Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 49 | 'unit_test/video_common_test.cc', |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 50 | ], |
| 51 | 'conditions': [ |
| 52 | ['OS=="linux"', { |
| 53 | 'cflags': [ |
| 54 | '-fexceptions', |
| 55 | ], |
| 56 | }], |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 57 | [ '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 Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 91 | [ '(target_arch == "mipsel" or target_arch == "mips64el") \ |
| 92 | and (mips_msa == 1)', { |
| 93 | 'defines': [ |
| 94 | 'LIBYUV_MSA' |
| 95 | ], |
| 96 | }], |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 97 | ], # conditions |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 98 | 'defines': [ |
| 99 | # Enable the following 3 macros to turn off assembly for specified CPU. |
| 100 | # 'LIBYUV_DISABLE_X86', |
| 101 | # 'LIBYUV_DISABLE_NEON', |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 102 | # 'LIBYUV_DISABLE_DSPR2', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 103 | # Enable the following macro to build libyuv as a shared library (dll). |
| 104 | # 'LIBYUV_USING_SHARED_LIBRARY', |
| 105 | ], |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 106 | }, |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 107 | { |
| 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 Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 125 | { |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 126 | 'target_name': 'yuvconvert', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 127 | 'type': 'executable', |
| 128 | 'dependencies': [ |
| 129 | 'libyuv.gyp:libyuv', |
| 130 | ], |
| 131 | 'sources': [ |
| 132 | # sources |
Frank Barchard | b33a82f | 2017-04-18 11:28:09 -0700 | [diff] [blame] | 133 | 'util/yuvconvert.cc', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 134 | ], |
| 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 Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 157 | [ '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 Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 176 | ], # targets |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 177 | 'conditions': [ |
| 178 | ['OS=="android"', { |
| 179 | 'targets': [ |
| 180 | { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 181 | 'target_name': 'yuv_unittest_apk', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 182 | 'type': 'none', |
| 183 | 'variables': { |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 184 | 'test_suite_name': 'yuv_unittest', |
| 185 | 'input_shlib_path': '<(SHARED_LIB_DIR)/(SHARED_LIB_PREFIX)libyuv_unittest<(SHARED_LIB_SUFFIX)', |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 186 | }, |
| 187 | 'includes': [ |
Frank Barchard | b83bb38 | 2017-02-22 18:01:07 -0800 | [diff] [blame] | 188 | 'build/apk_test.gypi', |
| 189 | ], |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 190 | 'dependencies': [ |
Hangyu Kuang | f047e7c | 2016-07-06 14:21:45 -0700 | [diff] [blame] | 191 | 'libyuv_unittest', |
| 192 | ], |
| 193 | }, |
| 194 | ], |
| 195 | }], |
| 196 | ], |
Hendrik Dahlkamp | 33cfdeb | 2013-01-23 18:27:37 -0800 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | # Local Variables: |
| 200 | # tab-width:2 |
| 201 | # indent-tabs-mode:nil |
| 202 | # End: |
| 203 | # vim: set expandtab tabstop=2 shiftwidth=2: |