| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2012 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 'variables': { | |
| 7 # Allow widevinecdmadapter to be built in Chromium. | |
| 8 'variables': { | |
| 9 'enable_widevine%': 0, | |
| 10 }, | |
| 11 'enable_widevine%': '<(enable_widevine)', | |
| 12 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', | |
| 13 'widevine_cdm_binary_files%': [], | |
| 14 'widevine_cdm_manifest_file%': [], | |
| 15 'conditions': [ | |
| 16 [ 'branding == "Chrome"', { | |
| 17 'conditions': [ | |
| 18 [ 'chromeos == 1', { | |
| 19 'widevine_cdm_version_h_file%': | |
| 20 'chromeos/<(target_arch)/widevine_cdm_version.h', | |
| 21 'widevine_cdm_binary_files%': [ | |
| 22 'chromeos/<(target_arch)/libwidevinecdm.so', | |
| 23 ], | |
| 24 }], | |
| 25 [ 'OS == "linux" and chromeos == 0', { | |
| 26 'widevine_cdm_version_h_file%': | |
| 27 'linux/<(target_arch)/widevine_cdm_version.h', | |
| 28 'widevine_cdm_binary_files%': [ | |
| 29 'linux/<(target_arch)/libwidevinecdm.so', | |
| 30 ], | |
| 31 }], | |
| 32 [ 'OS == "mac"', { | |
| 33 'widevine_cdm_version_h_file%': | |
| 34 'mac/<(target_arch)/widevine_cdm_version.h', | |
| 35 'widevine_cdm_binary_files%': [ | |
| 36 'mac/<(target_arch)/libwidevinecdm.dylib', | |
| 37 ], | |
| 38 'widevine_cdm_manifest_file%': [ | |
| 39 'mac/<(target_arch)/manifest.json', | |
| 40 ], | |
| 41 }], | |
| 42 [ 'OS == "win"', { | |
| 43 'widevine_cdm_version_h_file%': | |
| 44 'win/<(target_arch)/widevine_cdm_version.h', | |
| 45 'widevine_cdm_binary_files%': [ | |
| 46 'win/<(target_arch)/widevinecdm.dll', | |
| 47 'win/<(target_arch)/widevinecdm.dll.lib', | |
| 48 ], | |
| 49 'widevine_cdm_manifest_file%': [ | |
| 50 'win/<(target_arch)/manifest.json', | |
| 51 ], | |
| 52 }], | |
| 53 ], | |
| 54 }], | |
| 55 [ 'OS == "android"', { | |
| 56 'widevine_cdm_version_h_file%': | |
| 57 'android/widevine_cdm_version.h', | |
| 58 }], | |
| 59 [ 'branding != "Chrome" and OS != "android" and enable_widevine == 1', { | |
| 60 # If enable_widevine==1 then create a dummy widevinecdm. On Win/Mac | |
| 61 # the component updater will get the latest version and use it. | |
| 62 # Other systems are not currently supported. | |
| 63 'widevine_cdm_version_h_file%': | |
| 64 'stub/widevine_cdm_version.h', | |
| 65 }], | |
| 66 ], | |
| 67 }, | |
| 68 'includes': [ | |
| 69 '../../../build/util/version.gypi', | |
| 70 '../../../media/cdm_paths.gypi', | |
| 71 ], | |
| 72 # Always provide a target, so we can put the logic about whether there's | |
| 73 # anything to be done in this file (instead of a higher-level .gyp file). | |
| 74 'targets': [ | |
| 75 { | |
| 76 # GN version: //third_party/widevine/cdm:widevinecdmadapter_resources | |
| 77 'target_name': 'widevinecdmadapter_resources', | |
| 78 'type': 'none', | |
| 79 'variables': { | |
| 80 'output_dir': '.', | |
| 81 'branding_path': '../../../chrome/app/theme/<(branding_path_component)/B
RANDING', | |
| 82 'template_input_path': '../../../chrome/app/chrome_version.rc.version', | |
| 83 'extra_variable_files_arguments': [ '-f', 'BRANDING' ], | |
| 84 'extra_variable_files': [ 'BRANDING' ], # NOTE: matches that above | |
| 85 }, | |
| 86 'sources': [ | |
| 87 'widevinecdmadapter.ver', | |
| 88 ], | |
| 89 'includes': [ | |
| 90 '../../../chrome/version_resource_rules.gypi', | |
| 91 ], | |
| 92 }, | |
| 93 { | |
| 94 'target_name': 'widevinecdmadapter_binary', | |
| 95 'product_name': 'widevinecdmadapter', | |
| 96 'type': 'none', | |
| 97 'conditions': [ | |
| 98 [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms
== 1', { | |
| 99 'dependencies': [ | |
| 100 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', | |
| 101 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', | |
| 102 'widevine_cdm_version_h', | |
| 103 'widevine_cdm_manifest', | |
| 104 'widevinecdm', | |
| 105 'widevinecdmadapter_resources', | |
| 106 ], | |
| 107 'sources': [ | |
| 108 '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc', | |
| 109 ], | |
| 110 'conditions': [ | |
| 111 [ 'os_posix == 1 and OS != "mac"', { | |
| 112 'libraries': [ | |
| 113 '-lrt', | |
| 114 # Copied/created by widevinecdm. | |
| 115 '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.so', | |
| 116 ], | |
| 117 }], | |
| 118 [ 'OS == "win"', { | |
| 119 'libraries': [ | |
| 120 # Copied/created by widevinecdm. | |
| 121 '<(PRODUCT_DIR)/<(widevine_cdm_path)/widevinecdm.dll.lib', | |
| 122 ], | |
| 123 }], | |
| 124 [ 'OS == "mac"', { | |
| 125 'libraries': [ | |
| 126 # Copied/created by widevinecdm. | |
| 127 '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.dylib', | |
| 128 ], | |
| 129 }, { | |
| 130 # Put Widevine CDM adapter to the correct path directly except | |
| 131 # for mac. On mac strip_save_dsym doesn't work with product_dir | |
| 132 # so we rely on "widevinecdmadapter" target to copy it over. | |
| 133 # See http://crbug.com/611990 | |
| 134 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
| 135 }], | |
| 136 ], | |
| 137 }], | |
| 138 ], | |
| 139 }, | |
| 140 { | |
| 141 # GN version: //third_party/widevine/cdm:widevinecdmadapter | |
| 142 # On Mac this copies the widevinecdmadapter binary to | |
| 143 # <(widevine_cdm_path). On all other platforms the binary is already | |
| 144 # in <(widevine_cdm_path). See "product_dir" above. | |
| 145 'target_name': 'widevinecdmadapter', | |
| 146 'type': 'none', | |
| 147 'dependencies': [ | |
| 148 'widevinecdmadapter_binary', | |
| 149 ], | |
| 150 'conditions': [ | |
| 151 [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms
== 1 and OS == "mac"', { | |
| 152 'copies': [{ | |
| 153 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
| 154 'files': [ '<(PRODUCT_DIR)/widevinecdmadapter.plugin' ], | |
| 155 }], | |
| 156 }], | |
| 157 ], | |
| 158 }, | |
| 159 { | |
| 160 # GN version: //third_party/widevine/cdm:version_h | |
| 161 'target_name': 'widevine_cdm_version_h', | |
| 162 'type': 'none', | |
| 163 'copies': [{ | |
| 164 'destination': '<(SHARED_INTERMEDIATE_DIR)', | |
| 165 'files': [ '<(widevine_cdm_version_h_file)' ], | |
| 166 }], | |
| 167 }, | |
| 168 { | |
| 169 # GN version: //third_party/widevine/cdm:widevine_cdm_manifest | |
| 170 'target_name': 'widevine_cdm_manifest', | |
| 171 'type': 'none', | |
| 172 'conditions': [ | |
| 173 [ 'widevine_cdm_manifest_file != []', { | |
| 174 'copies': [{ | |
| 175 'destination': '<(PRODUCT_DIR)/WidevineCdm', | |
| 176 'files': [ '<(widevine_cdm_manifest_file)' ], | |
| 177 }], | |
| 178 }], | |
| 179 ], | |
| 180 }, | |
| 181 { | |
| 182 # GN version: //third_party/widevine/cdm:widevinecdm | |
| 183 'target_name': 'widevinecdm', | |
| 184 'type': 'none', | |
| 185 'conditions': [ | |
| 186 [ 'branding == "Chrome"', { | |
| 187 'conditions': [ | |
| 188 [ 'OS=="mac"', { | |
| 189 'xcode_settings': { | |
| 190 'COPY_PHASE_STRIP': 'NO', | |
| 191 } | |
| 192 }], | |
| 193 ], | |
| 194 'copies': [{ | |
| 195 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
| 196 'files': [ '<@(widevine_cdm_binary_files)' ], | |
| 197 }], | |
| 198 }], | |
| 199 [ 'branding != "Chrome" and enable_widevine == 1', { | |
| 200 # On Mac this copies the widevinecdm binary to <(widevine_cdm_path). | |
| 201 # On other platforms the binary is already in <(widevine_cdm_path). | |
| 202 # See "widevinecdm_binary". | |
| 203 'dependencies': [ | |
| 204 'widevinecdm_binary', | |
| 205 ], | |
| 206 'conditions': [ | |
| 207 ['OS == "mac"', { | |
| 208 'copies': [{ | |
| 209 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
| 210 'files': [ '<(PRODUCT_DIR)/libwidevinecdm.dylib' ], | |
| 211 }], | |
| 212 }], | |
| 213 ], | |
| 214 }], | |
| 215 ], | |
| 216 }, | |
| 217 { | |
| 218 # GN version: //third_party/widevine/cdm:widevine_test_license_server | |
| 219 'target_name': 'widevine_test_license_server', | |
| 220 'type': 'none', | |
| 221 'conditions': [ | |
| 222 [ 'branding == "Chrome" and OS == "linux"', { | |
| 223 'dependencies': [ | |
| 224 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy
p:test_license_server', | |
| 225 ], | |
| 226 }], | |
| 227 ], | |
| 228 }, | |
| 229 ], | |
| 230 'conditions': [ | |
| 231 [ 'branding != "Chrome" and enable_widevine == 1', { | |
| 232 'targets': [ | |
| 233 { | |
| 234 'target_name': 'widevinecdm_binary', | |
| 235 'product_name': 'widevinecdm', | |
| 236 'type': 'none', | |
| 237 'conditions': [ | |
| 238 ['os_posix == 1 and OS != "mac"', { | |
| 239 'type': 'loadable_module', | |
| 240 }], | |
| 241 ['OS == "mac" or OS == "win"', { | |
| 242 'type': 'shared_library', | |
| 243 }], | |
| 244 ['OS == "mac"', { | |
| 245 'xcode_settings': { | |
| 246 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | |
| 247 }, | |
| 248 }, { | |
| 249 # Put Widevine CDM in the correct path directly except | |
| 250 # for mac. On mac strip_save_dsym doesn't work with product_dir | |
| 251 # so we rely on the "widevinecdm" target to copy it over. | |
| 252 # See http://crbug.com/611990 | |
| 253 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
| 254 }], | |
| 255 ], | |
| 256 'defines': ['CDM_IMPLEMENTATION'], | |
| 257 'dependencies': [ | |
| 258 'widevine_cdm_version_h', | |
| 259 '<(DEPTH)/base/base.gyp:base', | |
| 260 ], | |
| 261 'sources': [ | |
| 262 '<(DEPTH)/media/cdm/stub/stub_cdm.cc', | |
| 263 '<(DEPTH)/media/cdm/stub/stub_cdm.h', | |
| 264 ], | |
| 265 }, | |
| 266 ], | |
| 267 }], | |
| 268 ], | |
| 269 } | |
| OLD | NEW |