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 'includes': [ 11 'libyuv.gypi', 12 ], 13 'variables': { 14 'use_system_libjpeg%': 0, 15 'libyuv_disable_jpeg%': 0, 16 'build_neon': 0, 17 'conditions': [ 18 [ '(target_arch == "armv7" or target_arch == "armv7s" or (target_arch == "arm" and arm_version >= 7)) and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)', { 19 'build_neon': 1, 20 }], 21 ], 22 }, 23 'conditions': [ 24 [ 'build_neon != 0', { 25 'targets': [ 26 # The NEON-specific components. 27 { 28 'target_name': 'libyuv_neon', 29 'type': 'static_library', 30 'standalone_static_library': 1, 31 # TODO(noahric): This should remove whatever mfpu is set, not 32 # just vfpv3-d16. 33 'cflags!': [ 34 '-mfpu=vfp', 35 '-mfpu=vfpv3', 36 '-mfpu=vfpv3-d16', 37 ], 38 'cflags': [ 39 '-mfpu=neon', 40 ], 41 'include_dirs': [ 42 'include', 43 '.', 44 ], 45 'direct_dependent_settings': { 46 'include_dirs': [ 47 'include', 48 '.', 49 ], 50 }, 51 'sources': [ 52 # sources. 53 'source/compare_neon.cc', 54 'source/rotate_neon.cc', 55 'source/row_neon.cc', 56 'source/scale_neon.cc', 57 ], 58 }, 59 ], 60 }], 61 ], 62 'targets': [ 63 { 64 'target_name': 'libyuv', 65 # Change type to 'shared_library' to build .so or .dll files. 66 'type': 'static_library', 67 # Allows libyuv.a redistributable library without external dependencies. 68 'standalone_static_library': 1, 69 'conditions': [ 70 [ 'OS == "ios" and target_subarch == 64', { 71 'defines': [ 72 'LIBYUV_DISABLE_NEON' 73 ], 74 }], 75 [ 'OS != "ios" and libyuv_disable_jpeg != 1', { 76 'defines': [ 77 'HAVE_JPEG' 78 ], 79 'conditions': [ 80 # Caveat system jpeg support may not support motion jpeg 81 [ 'use_system_libjpeg == 1', { 82 'dependencies': [ 83 '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', 84 ], 85 }, { 86 'dependencies': [ 87 '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', 88 ], 89 }], 90 [ 'use_system_libjpeg == 1', { 91 'link_settings': { 92 'libraries': [ 93 '-ljpeg', 94 ], 95 } 96 }], 97 ], 98 }], 99 [ 'build_neon != 0', { 100 'dependencies': [ 101 'libyuv_neon', 102 ], 103 'defines': [ 104 'LIBYUV_NEON', 105 ] 106 }], 107 # MemorySanitizer does not support assembly code yet. 108 # http://crbug.com/344505 109 [ 'msan == 1', { 110 'defines': [ 111 'LIBYUV_DISABLE_X86', 112 ], 113 }], 114 ], 115 'defines': [ 116 # Enable the following 3 macros to turn off assembly for specified CPU. 117 # 'LIBYUV_DISABLE_X86', 118 # 'LIBYUV_DISABLE_NEON', 119 # 'LIBYUV_DISABLE_MIPS', 120 # Enable the following macro to build libyuv as a shared library (dll). 121 # 'LIBYUV_USING_SHARED_LIBRARY', 122 ], 123 'include_dirs': [ 124 'include', 125 '.', 126 ], 127 'direct_dependent_settings': { 128 'include_dirs': [ 129 'include', 130 '.', 131 ], 132 }, 133 'sources': [ 134 '<@(libyuv_sources)', 135 ], 136 }, 137 ], # targets. 138 } 139 140 # Local Variables: 141 # tab-width:2 142 # indent-tabs-mode:nil 143 # End: 144 # vim: set expandtab tabstop=2 shiftwidth=2: 145