1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'widevine_cdm_version_h_file%': 'widevine_cdm_version.h',
'widevine_cdm_binary_files%': [],
'conditions': [
[ 'branding == "Chrome"', {
'conditions': [
[ 'chromeos == 1', {
'widevine_cdm_version_h_file%':
'symbols/chromeos/<(target_arch)/widevine_cdm_version.h',
'widevine_cdm_binary_files%': [
'binaries/chromeos/<(target_arch)/libwidevinecdm.so',
],
}],
[ 'OS == "linux" and chromeos == 0', {
'widevine_cdm_version_h_file%':
'symbols/linux/<(target_arch)/widevine_cdm_version.h',
'widevine_cdm_binary_files%': [
'binaries/linux/<(target_arch)/libwidevinecdm.so',
],
}],
[ 'OS == "mac"', {
'widevine_cdm_version_h_file%':
'symbols/mac/<(target_arch)/widevine_cdm_version.h',
'widevine_cdm_binary_files%': [
'binaries/mac/<(target_arch)/libwidevinecdm.dylib',
],
}],
[ 'OS == "win"', {
'widevine_cdm_version_h_file%':
'symbols/win/<(target_arch)/widevine_cdm_version.h',
'widevine_cdm_binary_files%': [
'binaries/win/<(target_arch)/widevinecdm.dll',
'binaries/win/<(target_arch)/widevinecdm.dll.lib',
],
}],
],
}],
],
},
# Always provide a target, so we can put the logic about whether there's
# anything to be done in this file (instead of a higher-level .gyp file).
'targets': [
{
'target_name': 'widevinecdmadapter',
'type': 'none',
'conditions': [
[ 'branding == "Chrome" and enable_pepper_cdms==1', {
'dependencies': [
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
'widevine_cdm_version_h',
'widevine_cdm_binaries',
],
'sources': [
'<(DEPTH)/media/cdm/ppapi/api/content_decryption_module.h',
'<(DEPTH)/media/cdm/ppapi/cdm_wrapper.cc',
'<(DEPTH)/media/cdm/ppapi/linked_ptr.h',
],
'conditions': [
[ 'os_posix == 1 and OS != "mac"', {
'cflags': ['-fvisibility=hidden'],
'type': 'loadable_module',
# Allow the plugin wrapper to find the CDM in the same directory.
'ldflags': ['-Wl,-rpath=\$$ORIGIN'],
'libraries': [
# Copied by widevine_cdm_binaries.
'<(PRODUCT_DIR)/libwidevinecdm.so',
],
}],
[ 'OS == "win"', {
'type': 'shared_library',
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
'libraries': [
# Copied by widevine_cdm_binaries.
'<(PRODUCT_DIR)/widevinecdm.dll.lib',
],
}],
[ 'OS == "mac"', {
'type': 'loadable_module',
'product_extension': 'plugin',
'libraries': [
# Copied by widevine_cdm_binaries.
'<(PRODUCT_DIR)/libwidevinecdm.dylib',
],
'xcode_settings': {
'OTHER_LDFLAGS': [
# Not to strip important symbols by -Wl,-dead_strip.
'-Wl,-exported_symbol,_PPP_GetInterface',
'-Wl,-exported_symbol,_PPP_InitializeModule',
'-Wl,-exported_symbol,_PPP_ShutdownModule',
],
'DYLIB_INSTALL_NAME_BASE': '@loader_path',
},
}],
],
}],
],
},
{
'target_name': 'widevine_cdm_version_h',
'type': 'none',
'copies': [{
'destination': '<(SHARED_INTERMEDIATE_DIR)',
'files': [ '<(widevine_cdm_version_h_file)' ],
}],
},
{
'target_name': 'widevine_cdm_binaries',
'type': 'none',
'conditions': [
[ 'OS=="mac"', {
'xcode_settings': {
'COPY_PHASE_STRIP': 'NO',
}
}],
],
'copies': [{
# TODO(ddorwin): Do we need a sub-directory? We either need a
# sub-directory or to rename manifest.json before we can copy it.
'destination': '<(PRODUCT_DIR)',
'files': [ '<@(widevine_cdm_binary_files)' ],
}],
},
],
}
|