Chromium Code Reviews| Index: third_party/widevine/cdm/widevine_cdm.gyp |
| diff --git a/third_party/widevine/cdm/widevine_cdm.gyp b/third_party/widevine/cdm/widevine_cdm.gyp |
| index 94a541cb22caf28a5d2e99d3f2dc60559a75eb2c..e1535170de30be99420b33b4d89e3e40f784c267 100644 |
| --- a/third_party/widevine/cdm/widevine_cdm.gyp |
| +++ b/third_party/widevine/cdm/widevine_cdm.gyp |
| @@ -179,6 +179,38 @@ |
| ], |
| }, |
| { |
| + 'target_name': 'widevinecdm_binary', |
| + 'product_name': 'widevinecdm', |
| + 'type': 'none', |
| + 'conditions': [ |
| + ['os_posix == 1 and OS != "mac"', { |
| + 'type': 'loadable_module', |
| + }], |
| + ['OS == "mac" or OS == "win"', { |
| + 'type': 'shared_library', |
| + }], |
| + ['OS == "mac"', { |
| + 'xcode_settings': { |
| + 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
| + }, |
| + }, { |
| + # Put Widevine CDM in the correct path directly except |
| + # for mac. On mac strip_save_dsym doesn't work with product_dir |
| + # so we rely on the "widevinecdm" target to copy it over. |
| + 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', |
|
ddorwin
2016/07/08 16:16:44
Also include the bug reference?
# See http://crbu
wdzierzanowski
2016/07/08 21:30:47
Done.
|
| + }], |
| + ], |
| + 'defines': ['CDM_IMPLEMENTATION'], |
| + 'dependencies': [ |
| + 'widevine_cdm_version_h', |
| + '<(DEPTH)/base/base.gyp:base', |
| + ], |
| + 'sources': [ |
| + '<(DEPTH)/media/cdm/stub/stub_cdm.cc', |
| + '<(DEPTH)/media/cdm/stub/stub_cdm.h', |
| + ], |
| + }, |
| + { |
| # GN version: //third_party/widevine/cdm:widevinecdm |
| 'target_name': 'widevinecdm', |
| 'type': 'none', |
| @@ -197,32 +229,20 @@ |
| }], |
| }], |
| [ 'branding != "Chrome" and enable_widevine == 1', { |
| - 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', |
| + # On Mac this copies the widevinecdm binary to <(widevine_cdm_path). |
| + # On other platforms the binary is already in <(widevine_cdm_path). |
| + # See "widevinecdm_binary" above. |
| + 'dependencies': [ |
| + 'widevinecdm_binary', |
| + ], |
| 'conditions': [ |
| - ['os_posix == 1 and OS != "mac"', { |
| - 'type': 'loadable_module', |
| - # This causes the binary to be put in |
| - # <(PRODUCT_DIR)/<(widevine_cdm_path) instead of lib/. |
| - # This matches what happens in the copy step above. |
| - }], |
| - ['OS == "mac" or OS == "win"', { |
| - 'type': 'shared_library', |
| - }], |
| ['OS == "mac"', { |
| - 'xcode_settings': { |
| - 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
| - }, |
| + 'copies': [{ |
| + 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', |
| + 'files': [ '<(PRODUCT_DIR)/libwidevinecdm.dylib' ], |
| + }], |
| }], |
| ], |
| - 'defines': ['CDM_IMPLEMENTATION'], |
| - 'dependencies': [ |
| - 'widevine_cdm_version_h', |
| - '<(DEPTH)/base/base.gyp:base', |
| - ], |
| - 'sources': [ |
| - '<(DEPTH)/media/cdm/stub/stub_cdm.cc', |
| - '<(DEPTH)/media/cdm/stub/stub_cdm.h', |
| - ], |
| }], |
| ], |
| }, |