OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # Allow widevinecdmadapter to be built in Chromium. | |
8 'enable_widevine%': 0, | |
ddorwin
2015/04/01 23:27:32
In common.gypi, this is after the nested block and
jrummell
2015/04/02 23:47:55
Done.
| |
9 'variables': { | |
10 'enable_widevine%': 0, | |
11 }, | |
7 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', | 12 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', |
8 'widevine_cdm_binary_files%': [], | 13 'widevine_cdm_binary_files%': [], |
9 'conditions': [ | 14 'conditions': [ |
10 [ 'branding == "Chrome"', { | 15 [ 'branding == "Chrome"', { |
11 'conditions': [ | 16 'conditions': [ |
12 [ 'chromeos == 1', { | 17 [ 'chromeos == 1', { |
13 'widevine_cdm_version_h_file%': | 18 'widevine_cdm_version_h_file%': |
14 'chromeos/<(target_arch)/widevine_cdm_version.h', | 19 'chromeos/<(target_arch)/widevine_cdm_version.h', |
15 'widevine_cdm_binary_files%': [ | 20 'widevine_cdm_binary_files%': [ |
16 'chromeos/<(target_arch)/libwidevinecdm.so', | 21 'chromeos/<(target_arch)/libwidevinecdm.so', |
(...skipping 20 matching lines...) Expand all Loading... | |
37 'win/<(target_arch)/widevinecdm.dll', | 42 'win/<(target_arch)/widevinecdm.dll', |
38 'win/<(target_arch)/widevinecdm.dll.lib', | 43 'win/<(target_arch)/widevinecdm.dll.lib', |
39 ], | 44 ], |
40 }], | 45 }], |
41 ], | 46 ], |
42 }], | 47 }], |
43 [ 'OS == "android"', { | 48 [ 'OS == "android"', { |
44 'widevine_cdm_version_h_file%': | 49 'widevine_cdm_version_h_file%': |
45 'android/widevine_cdm_version.h', | 50 'android/widevine_cdm_version.h', |
46 }], | 51 }], |
52 [ 'branding != "Chrome" and OS != "android" and enable_widevine==1', { | |
53 # If enable_widevine==1 then use stub_cdm to create the adapter for | |
54 # Widevine. On Win/Mac the component updater will get the latest version | |
55 # and use it. Other systems are not currently supported, but will build. | |
56 'widevine_cdm_version_h_file%': | |
57 'stub/widevine_cdm_version.h', | |
ddorwin
2015/04/01 23:27:32
Widevine-specific file should not be in common cod
jrummell
2015/04/02 23:47:55
See previous comment in widevine_cdm_version.h.
ddorwin
2015/04/03 18:30:56
Ignore this too. This is relative to widevine/cdm.
| |
58 'conditions': [ | |
59 [ 'os_posix == 1 and OS != "mac"', { | |
60 'stub_cdm_binary_files%': [ | |
61 '<(PRODUCT_DIR)/libstubcdm.so', | |
62 ], | |
63 'widevine_cdm_binary_files%': [ | |
64 '<(PRODUCT_DIR)/libwidevinecdm.so', | |
65 ], | |
66 }], | |
67 [ 'OS == "mac"', { | |
68 'stub_cdm_binary_files%': [ | |
69 '<(PRODUCT_DIR)/libstubcdm.dylib', | |
70 ], | |
71 'widevine_cdm_binary_files%': [ | |
72 '<(PRODUCT_DIR)/libwidevinecdm.dylib', | |
73 ], | |
74 }], | |
75 [ 'OS == "win"', { | |
76 'stub_cdm_binary_files%': [ | |
77 '<(PRODUCT_DIR)/stubcdm.dll', | |
78 '<(PRODUCT_DIR)/stubcdm.dll.lib', | |
79 ], | |
80 'widevine_cdm_binary_files%': [ | |
81 '<(PRODUCT_DIR)/widevinecdm.dll', | |
82 '<(PRODUCT_DIR)/widevinecdm.dll.lib', | |
83 ], | |
84 }], | |
85 ], | |
86 }], | |
47 ], | 87 ], |
48 }, | 88 }, |
49 'includes': [ | 89 'includes': [ |
50 '../../../build/util/version.gypi', | 90 '../../../build/util/version.gypi', |
51 ], | 91 ], |
52 | 92 |
53 # Always provide a target, so we can put the logic about whether there's | 93 # Always provide a target, so we can put the logic about whether there's |
54 # anything to be done in this file (instead of a higher-level .gyp file). | 94 # anything to be done in this file (instead of a higher-level .gyp file). |
55 'targets': [ | 95 'targets': [ |
56 { | 96 { |
(...skipping 22 matching lines...) Expand all Loading... | |
79 ], | 119 ], |
80 'includes': [ | 120 'includes': [ |
81 '../../../chrome/version_resource_rules.gypi', | 121 '../../../chrome/version_resource_rules.gypi', |
82 ], | 122 ], |
83 }, | 123 }, |
84 { | 124 { |
85 # GN version: //third_party/widevine/cdm:adapter | 125 # GN version: //third_party/widevine/cdm:adapter |
86 'target_name': 'widevinecdmadapter', | 126 'target_name': 'widevinecdmadapter', |
87 'type': 'none', | 127 'type': 'none', |
88 'conditions': [ | 128 'conditions': [ |
89 [ 'branding == "Chrome" and enable_pepper_cdms==1', { | 129 [ '(branding == "Chrome" or enable_widevine==1) and enable_pepper_cdms== 1', { |
90 'dependencies': [ | 130 'dependencies': [ |
91 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', | 131 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', |
92 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', | 132 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', |
93 'widevine_cdm_version_h', | 133 'widevine_cdm_version_h', |
94 'widevine_cdm_binaries', | 134 'widevine_cdm_binaries', |
95 'widevinecdmadapter_resources', | 135 'widevinecdmadapter_resources', |
96 ], | 136 ], |
97 'sources': [ | 137 'sources': [ |
98 '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc', | 138 '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc', |
99 ], | 139 ], |
(...skipping 12 matching lines...) Expand all Loading... | |
112 ], | 152 ], |
113 }], | 153 }], |
114 [ 'OS == "mac"', { | 154 [ 'OS == "mac"', { |
115 'libraries': [ | 155 'libraries': [ |
116 # Copied by widevine_cdm_binaries. | 156 # Copied by widevine_cdm_binaries. |
117 '<(PRODUCT_DIR)/libwidevinecdm.dylib', | 157 '<(PRODUCT_DIR)/libwidevinecdm.dylib', |
118 ], | 158 ], |
119 }], | 159 }], |
120 ], | 160 ], |
121 }], | 161 }], |
162 [ 'branding != "Chrome" and enable_widevine==1 and enable_pepper_cdms==1 ', { | |
163 'dependencies': [ | |
164 '<(DEPTH)/media/media.gyp:stubcdm', | |
xhwang
2015/04/02 18:51:52
hmm, why not depend on widevine_cdm_binaries?
And
jrummell
2015/04/02 23:47:55
Removed, since the widevine_cdm_binaries depends o
| |
165 ], | |
166 }], | |
122 ], | 167 ], |
123 }, | 168 }, |
124 { | 169 { |
125 # GN version: //third_party/widevine/cdm:version_h | 170 # GN version: //third_party/widevine/cdm:version_h |
126 'target_name': 'widevine_cdm_version_h', | 171 'target_name': 'widevine_cdm_version_h', |
127 'type': 'none', | 172 'type': 'none', |
128 'copies': [{ | 173 'copies': [{ |
129 'destination': '<(SHARED_INTERMEDIATE_DIR)', | 174 'destination': '<(SHARED_INTERMEDIATE_DIR)', |
130 'files': [ '<(widevine_cdm_version_h_file)' ], | 175 'files': [ '<(widevine_cdm_version_h_file)' ], |
131 }], | 176 }], |
132 }, | 177 }, |
133 { | 178 { |
134 # GN version: //third_party/widevine/cdm:binaries | 179 # GN version: //third_party/widevine/cdm:binaries |
135 'target_name': 'widevine_cdm_binaries', | 180 'target_name': 'widevine_cdm_binaries', |
136 'type': 'none', | 181 'type': 'none', |
137 'conditions': [ | 182 'conditions': [ |
138 [ 'OS=="mac"', { | 183 [ 'OS=="mac"', { |
139 'xcode_settings': { | 184 'xcode_settings': { |
140 'COPY_PHASE_STRIP': 'NO', | 185 'COPY_PHASE_STRIP': 'NO', |
141 } | 186 } |
142 }], | 187 }], |
188 [ 'branding == "Chrome"', { | |
189 'copies': [{ | |
190 # TODO(ddorwin): Do we need a sub-directory? We either need a | |
191 # sub-directory or to rename manifest.json before we can copy it. | |
192 'destination': '<(PRODUCT_DIR)', | |
193 'files': [ '<@(widevine_cdm_binary_files)' ], | |
194 }], | |
195 }], | |
196 [ 'branding != "Chrome" and OS != "android" and enable_widevine==1', { | |
ddorwin
2015/04/01 23:27:32
remove the android check here too?
jrummell
2015/04/02 23:47:55
For Android there are no stub files, so this will
ddorwin
2015/04/03 02:06:56
Oh, do we evaluate these rules even if there is no
| |
197 'dependencies': [ | |
198 '<(DEPTH)/media/media.gyp:stubcdm', | |
199 ], | |
200 'actions': [{ | |
201 'action_name': 'copy_with_rename', | |
202 'inputs': [ | |
203 'copy_with_rename.py', | |
204 '<@(stub_cdm_binary_files)', | |
205 ], | |
206 'outputs': [ | |
207 '<@(widevine_cdm_binary_files)', | |
208 ], | |
209 'action': ['python', 'copy_with_rename.py', | |
210 '<@(stub_cdm_binary_files)', | |
211 '<@(widevine_cdm_binary_files)'], | |
212 }], | |
213 }], | |
143 ], | 214 ], |
144 'copies': [{ | |
145 # TODO(ddorwin): Do we need a sub-directory? We either need a | |
146 # sub-directory or to rename manifest.json before we can copy it. | |
147 'destination': '<(PRODUCT_DIR)', | |
148 'files': [ '<@(widevine_cdm_binary_files)' ], | |
149 }], | |
150 }, | 215 }, |
151 { | 216 { |
152 'target_name': 'widevine_test_license_server', | 217 'target_name': 'widevine_test_license_server', |
153 'type': 'none', | 218 'type': 'none', |
154 'conditions': [ | 219 'conditions': [ |
155 [ 'branding == "Chrome" and OS == "linux"', { | 220 [ 'branding == "Chrome" and OS == "linux"', { |
156 'dependencies': [ | 221 'dependencies': [ |
157 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy p:test_license_server', | 222 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy p:test_license_server', |
158 ], | 223 ], |
159 }], | 224 }], |
160 ], | 225 ], |
161 }, | 226 }, |
162 ], | 227 ], |
163 } | 228 } |
OLD | NEW |