OLD | NEW |
(Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 { |
| 6 'conditions': [ |
| 7 ['use_openh264==1', { |
| 8 # Settings shared by all openh264 targets. |
| 9 'target_defaults': { |
| 10 'variables': { |
| 11 'chromium_code': 0, |
| 12 'conditions': [ |
| 13 ['OS!="win"', { |
| 14 # GCC flags |
| 15 'openh264_cflags_add': [ |
| 16 '-Wno-macro-redefined', # due to VERSION_NUMBER workaround |
| 17 '-Wno-unused-value', |
| 18 ], |
| 19 'openh264_cflags_remove': [ |
| 20 '-Wheader-hygiene', |
| 21 ], |
| 22 },{ |
| 23 # Windows uses 'msvs_disabled_warnings' instead, for MSVC flags. |
| 24 'openh264_cflags_add': [], |
| 25 'openh264_cflags_remove': [], |
| 26 }], |
| 27 ], |
| 28 }, |
| 29 'cflags': [ '<@(openh264_cflags_add)' ], |
| 30 'cflags!': [ '<@(openh264_cflags_remove)' ], |
| 31 'xcode_settings': { |
| 32 'WARNING_CFLAGS': [ '<@(openh264_cflags_add)' ], |
| 33 'WARNING_CFLAGS!': [ '<@(openh264_cflags_remove)' ], |
| 34 }, |
| 35 'msvs_disabled_warnings': [ |
| 36 4005, # macro redefinition - due to VERSION_NUMBER workaround |
| 37 4324, # structure was padded |
| 38 4245, # signed/unsigned mismatch |
| 39 4701, # uninitialized variable used |
| 40 4702, # unreachable code |
| 41 ], |
| 42 |
| 43 # Platform-specific defines. |
| 44 'conditions': [ |
| 45 ['OS=="android"', { |
| 46 'defines': [ |
| 47 'ANDROID_NDK', |
| 48 ], |
| 49 }], |
| 50 ], |
| 51 |
| 52 # Workaround relating to the VERSION_NUMBER macro in version.h. |
| 53 # TODO(hbos): Fix cause of the issue instead of this workaround. |
| 54 'defines': [ |
| 55 # On some builds VERSION_NUMBER is not defined when including |
| 56 # version.h (probably another file is included named version.h, I have |
| 57 # not been able to reproduce the problem on a local machine). Since |
| 58 # the macro is only used for debug printing in wels[En/De]coderExt.cpp |
| 59 # we can get around the undeclared identifier error by giving it a |
| 60 # default value ourselves. |
| 61 'VERSION_NUMBER="openh264 v.?.?"', |
| 62 ], |
| 63 }, |
| 64 'includes': [ |
| 65 'openh264.gypi', |
| 66 ], |
| 67 'targets': [ |
| 68 { |
| 69 'target_name': 'openh264_common', |
| 70 'type': 'static_library', |
| 71 'conditions': [ |
| 72 ['OS=="android"', { |
| 73 'dependencies': [ |
| 74 # Defines "android_get/setCpu..." functions. The original |
| 75 # OpenH264 build files replaces these using macros for |
| 76 # "wels_..." versions of the same functions. We do not have |
| 77 # access to these and use the <cpu-features.h> ones instead. |
| 78 '<(DEPTH)/build/android/ndk.gyp:cpu_features', |
| 79 ], |
| 80 }], |
| 81 ], |
| 82 'include_dirs': [ |
| 83 'src/codec/api/svc', |
| 84 'src/codec/common/inc', |
| 85 'src/codec/common/src', |
| 86 ], |
| 87 'sources': [ |
| 88 '<@(openh264_common_sources)', |
| 89 ], |
| 90 }, |
| 91 { |
| 92 'target_name': 'openh264_processing', |
| 93 'type': 'static_library', |
| 94 'dependencies': [ |
| 95 'openh264_common', |
| 96 ], |
| 97 'include_dirs': [ |
| 98 'src/codec/api/svc', |
| 99 'src/codec/common/inc', |
| 100 'src/codec/common/src', |
| 101 'src/codec/processing/interface', |
| 102 'src/codec/processing/interface/', |
| 103 'src/codec/processing/src/adaptivequantization', |
| 104 'src/codec/processing/src/backgrounddetection', |
| 105 'src/codec/processing/src/common', |
| 106 'src/codec/processing/src/complexityanalysis', |
| 107 'src/codec/processing/src/denoise', |
| 108 'src/codec/processing/src/downsample', |
| 109 'src/codec/processing/src/imagerotate', |
| 110 'src/codec/processing/src/scenechangedetection', |
| 111 'src/codec/processing/src/scrolldetection', |
| 112 'src/codec/processing/src/vaacalc', |
| 113 ], |
| 114 'sources': [ |
| 115 '<@(openh264_processing_sources)', |
| 116 ], |
| 117 }, |
| 118 { |
| 119 'target_name': 'openh264_encoder', |
| 120 'type': 'static_library', |
| 121 'dependencies': [ |
| 122 'openh264_common', |
| 123 'openh264_processing', |
| 124 ], |
| 125 'include_dirs': [ |
| 126 'src/codec/api/svc', |
| 127 'src/codec/common/inc', |
| 128 'src/codec/common/src', |
| 129 'src/codec/encoder/core/inc', |
| 130 'src/codec/encoder/core/src', |
| 131 'src/codec/encoder/plus/inc', |
| 132 'src/codec/encoder/plus/src', |
| 133 'src/codec/processing/interface/', |
| 134 ], |
| 135 'sources': [ |
| 136 '<@(openh264_encoder_sources)', |
| 137 ], |
| 138 }, |
| 139 { |
| 140 'target_name': 'openh264_decoder', |
| 141 'type': 'static_library', |
| 142 'dependencies': [ |
| 143 'openh264_common', |
| 144 'openh264_processing', |
| 145 ], |
| 146 'defines': [ |
| 147 # Disables decoder_core.cpp debug prints. |
| 148 'CODEC_FOR_TESTBED', |
| 149 ], |
| 150 'include_dirs': [ |
| 151 'src/codec/api/svc', |
| 152 'src/codec/common/inc', |
| 153 'src/codec/common/src', |
| 154 'src/codec/decoder/core/inc', |
| 155 'src/codec/decoder/core/src', |
| 156 'src/codec/decoder/plus/inc', |
| 157 'src/codec/decoder/plus/src', |
| 158 'src/codec/processing/interface/', |
| 159 ], |
| 160 'sources': [ |
| 161 '<@(openh264_decoder_sources)', |
| 162 ], |
| 163 }, |
| 164 ], |
| 165 },{ |
| 166 # Building without OpenH264. Defining a dummy target because every build |
| 167 # file needs to have at least one target. |
| 168 'targets': [ |
| 169 { |
| 170 'target_name': 'openh264_dummy_target', |
| 171 'type': 'none', |
| 172 } |
| 173 ], |
| 174 }], |
| 175 ], |
| 176 } |
OLD | NEW |