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 'includes': [ |
| 7 'openh264_args.gypi', |
| 8 ], |
| 9 'conditions': [ |
| 10 ['use_openh264==1', { |
| 11 # Settings shared by all openh264 targets. |
| 12 'target_defaults': { |
| 13 'variables': { |
| 14 'chromium_code': 0, |
| 15 'conditions': [ |
| 16 ['OS!="win"', { |
| 17 # GCC flags |
| 18 'openh264_cflags_add': [ |
| 19 '-Wno-macro-redefined', # due to VERSION_NUMBER workaround |
| 20 '-Wno-unused-value', |
| 21 ], |
| 22 'openh264_cflags_remove': [ |
| 23 '-Wheader-hygiene', |
| 24 ], |
| 25 },{ |
| 26 # Windows uses 'msvs_disabled_warnings' instead, for MSVC flags. |
| 27 'openh264_cflags_add': [], |
| 28 'openh264_cflags_remove': [], |
| 29 }], |
| 30 ], |
| 31 }, |
| 32 'cflags': [ '<@(openh264_cflags_add)' ], |
| 33 'cflags!': [ '<@(openh264_cflags_remove)' ], |
| 34 'xcode_settings': { |
| 35 'WARNING_CFLAGS': [ '<@(openh264_cflags_add)' ], |
| 36 'WARNING_CFLAGS!': [ '<@(openh264_cflags_remove)' ], |
| 37 }, |
| 38 'msvs_disabled_warnings': [ |
| 39 4005, # macro redefinition - due to VERSION_NUMBER workaround |
| 40 4324, # structure was padded |
| 41 4245, # signed/unsigned mismatch |
| 42 4701, # uninitialized variable used |
| 43 4702, # unreachable code |
| 44 ], |
| 45 |
| 46 # Platform-specific defines. |
| 47 'conditions': [ |
| 48 ['OS=="android"', { |
| 49 'defines': [ |
| 50 'ANDROID_NDK', |
| 51 ], |
| 52 }], |
| 53 ], |
| 54 |
| 55 # Workaround relating to the VERSION_NUMBER macro in version.h. |
| 56 # TODO(hbos): Fix cause of the issue instead of this workaround. |
| 57 'defines': [ |
| 58 # On some builds VERSION_NUMBER is not defined when including |
| 59 # version.h (probably another file is included named version.h, I have |
| 60 # not been able to reproduce the problem on a local machine). Since |
| 61 # the macro is only used for debug printing in wels[En/De]coderExt.cpp |
| 62 # we can get around the undeclared identifier error by giving it a |
| 63 # default value ourselves. |
| 64 'VERSION_NUMBER="openh264 v.?.?"', |
| 65 ], |
| 66 }, |
| 67 'includes': [ |
| 68 'openh264.gypi', |
| 69 ], |
| 70 'targets': [ |
| 71 { |
| 72 'target_name': 'openh264_common', |
| 73 'type': 'static_library', |
| 74 'conditions': [ |
| 75 ['OS=="android"', { |
| 76 'dependencies': [ |
| 77 # Defines "android_get/setCpu..." functions. The original |
| 78 # OpenH264 build files replaces these using macros for |
| 79 # "wels_..." versions of the same functions. We do not have |
| 80 # access to these and use the <cpu-features.h> ones instead. |
| 81 '<(DEPTH)/build/android/ndk.gyp:cpu_features', |
| 82 ], |
| 83 }], |
| 84 ], |
| 85 'include_dirs': [ '<@(openh264_common_includes)' ], |
| 86 'sources': [ '<@(openh264_common_sources)' ], |
| 87 }, |
| 88 { |
| 89 'target_name': 'openh264_processing', |
| 90 'type': 'static_library', |
| 91 'dependencies': [ |
| 92 'openh264_common', |
| 93 ], |
| 94 'include_dirs': [ '<@(openh264_processing_includes)' ], |
| 95 'sources': [ '<@(openh264_processing_sources)' ], |
| 96 }, |
| 97 { |
| 98 'target_name': 'openh264_encoder', |
| 99 'type': 'static_library', |
| 100 'dependencies': [ |
| 101 'openh264_common', |
| 102 'openh264_processing', |
| 103 ], |
| 104 'include_dirs': [ '<@(openh264_encoder_includes)' ], |
| 105 'sources': [ '<@(openh264_encoder_sources)' ], |
| 106 }, |
| 107 { |
| 108 'target_name': 'openh264_decoder', |
| 109 'type': 'static_library', |
| 110 'dependencies': [ |
| 111 'openh264_common', |
| 112 'openh264_processing', |
| 113 ], |
| 114 'defines': [ |
| 115 # Disables decoder_core.cpp debug prints. |
| 116 'CODEC_FOR_TESTBED', |
| 117 ], |
| 118 'include_dirs': [ '<@(openh264_decoder_includes)' ], |
| 119 'sources': [ '<@(openh264_decoder_sources)' ], |
| 120 }, |
| 121 ], |
| 122 },{ |
| 123 # Building without OpenH264. Defining a dummy target because every build |
| 124 # file needs to have at least one target. |
| 125 'targets': [ |
| 126 { |
| 127 'target_name': 'openh264_dummy_target', |
| 128 'type': 'none', |
| 129 } |
| 130 ], |
| 131 }], |
| 132 ], |
| 133 } |
OLD | NEW |