Home | History | Annotate | Download | only in files
      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     # Can be enabled if your jpeg has GYP support.
     12     'libyuv_disable_jpeg%': 1,
     13     'mips_msa%': 0,  # Default to msa off.
     14   },
     15   'targets': [
     16     {
     17       'target_name': 'libyuv_unittest',
     18       'type': '<(gtest_target_type)',
     19       'dependencies': [
     20         'libyuv.gyp:libyuv',
     21         'testing/gtest.gyp:gtest',
     22         'third_party/gflags/gflags.gyp:gflags',
     23       ],
     24       'direct_dependent_settings': {
     25         'defines': [
     26           'GTEST_RELATIVE_PATH',
     27         ],
     28       },
     29       'export_dependent_settings': [
     30         '<(DEPTH)/testing/gtest.gyp:gtest',
     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/color_test.cc',
     40         'unit_test/convert_test.cc',
     41         'unit_test/cpu_test.cc',
     42         'unit_test/math_test.cc',
     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',
     49         'unit_test/video_common_test.cc',
     50       ],
     51       'conditions': [
     52         ['OS=="linux"', {
     53           'cflags': [
     54             '-fexceptions',
     55           ],
     56         }],
     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         }],
     91         [ '(target_arch == "mipsel" or target_arch == "mips64el") \
     92           and (mips_msa == 1)', {
     93           'defines': [
     94             'LIBYUV_MSA'
     95           ],
     96         }],
     97       ], # conditions
     98       'defines': [
     99         # Enable the following 3 macros to turn off assembly for specified CPU.
    100         # 'LIBYUV_DISABLE_X86',
    101         # 'LIBYUV_DISABLE_NEON',
    102         # 'LIBYUV_DISABLE_DSPR2',
    103         # Enable the following macro to build libyuv as a shared library (dll).
    104         # 'LIBYUV_USING_SHARED_LIBRARY',
    105       ],
    106     },
    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     },
    125     {
    126       'target_name': 'yuvconvert',
    127       'type': 'executable',
    128       'dependencies': [
    129         'libyuv.gyp:libyuv',
    130       ],
    131       'sources': [
    132         # sources
    133         'util/yuvconvert.cc',
    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': [
    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     },
    176   ], # targets
    177   'conditions': [
    178     ['OS=="android"', {
    179       'targets': [
    180         {
    181           'target_name': 'yuv_unittest_apk',
    182           'type': 'none',
    183           'variables': {
    184             'test_suite_name': 'yuv_unittest',
    185             'input_shlib_path': '<(SHARED_LIB_DIR)/(SHARED_LIB_PREFIX)libyuv_unittest<(SHARED_LIB_SUFFIX)',
    186           },
    187           'includes': [
    188             'build/apk_test.gypi',
    189           ],
    190           'dependencies': [
    191             'libyuv_unittest',
    192           ],
    193         },
    194       ],
    195     }],
    196   ],
    197 }
    198 
    199 # Local Variables:
    200 # tab-width:2
    201 # indent-tabs-mode:nil
    202 # End:
    203 # vim: set expandtab tabstop=2 shiftwidth=2:
    204