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-unused-value', |
| 20 ], |
| 21 'openh264_cflags_remove': [ |
| 22 '-Wheader-hygiene', |
| 23 ], |
| 24 },{ |
| 25 # Windows uses 'msvs_disabled_warnings' instead, for MSVC flags. |
| 26 'openh264_cflags_add': [], |
| 27 'openh264_cflags_remove': [], |
| 28 }], |
| 29 ], |
| 30 }, |
| 31 'cflags': [ '<@(openh264_cflags_add)' ], |
| 32 'cflags!': [ '<@(openh264_cflags_remove)' ], |
| 33 'xcode_settings': { |
| 34 'WARNING_CFLAGS': [ '<@(openh264_cflags_add)' ], |
| 35 'WARNING_CFLAGS!': [ '<@(openh264_cflags_remove)' ], |
| 36 }, |
| 37 'msvs_disabled_warnings': [ |
| 38 4324, # structure was padded |
| 39 4245, # signed/unsigned mismatch |
| 40 4701, # uninitialized variable used |
| 41 4702, # unreachable code |
| 42 ], |
| 43 |
| 44 # Platform-specific defines. |
| 45 'conditions': [ |
| 46 ['OS=="android"', { |
| 47 'defines': [ |
| 48 # Android NDK is necessary for its cpufeatures and this define is |
| 49 # what OpenH264 code uses to check if it should be used. |
| 50 'ANDROID_NDK', |
| 51 ], |
| 52 }], |
| 53 ], |
| 54 }, |
| 55 'includes': [ |
| 56 'openh264.gypi', |
| 57 ], |
| 58 'targets': [ |
| 59 { |
| 60 'target_name': 'openh264_common', |
| 61 'type': 'static_library', |
| 62 'conditions': [ |
| 63 ['OS=="android"', { |
| 64 'dependencies': [ |
| 65 # Defines "android_get/setCpu..." functions. The original |
| 66 # OpenH264 build files replaces these using macros for |
| 67 # "wels_..." versions of the same functions. We do not have |
| 68 # access to these and use the <cpu-features.h> ones instead. |
| 69 '<(DEPTH)/build/android/ndk.gyp:cpu_features', |
| 70 ], |
| 71 }], |
| 72 ], |
| 73 'include_dirs+': [ '<@(openh264_common_includes)' ], |
| 74 'sources': [ '<@(openh264_common_sources)' ], |
| 75 }, |
| 76 { |
| 77 'target_name': 'openh264_processing', |
| 78 'type': 'static_library', |
| 79 'dependencies': [ |
| 80 'openh264_common', |
| 81 ], |
| 82 'include_dirs+': [ '<@(openh264_processing_includes)' ], |
| 83 'sources': [ '<@(openh264_processing_sources)' ], |
| 84 }, |
| 85 { |
| 86 'target_name': 'openh264_encoder', |
| 87 'type': 'static_library', |
| 88 'dependencies': [ |
| 89 'openh264_common', |
| 90 'openh264_processing', |
| 91 ], |
| 92 'include_dirs+': [ '<@(openh264_encoder_includes)' ], |
| 93 'sources': [ '<@(openh264_encoder_sources)' ], |
| 94 }, |
| 95 ], |
| 96 },{ |
| 97 # Building without OpenH264. Defining a dummy target because every build |
| 98 # file needs to have at least one target. |
| 99 'targets': [ |
| 100 { |
| 101 'target_name': 'openh264_dummy_target', |
| 102 'type': 'none', |
| 103 } |
| 104 ], |
| 105 }], |
| 106 ], |
| 107 } |
OLD | NEW |