Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: third_party/widevine/cdm/widevine_cdm.gyp

Issue 1043673002: Allow widevinecdmadapter to be built in Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 'variables': {
9 'enable_widevine%': 0,
10 },
11 'enable_widevine%': '<(enable_widevine)',
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
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',
58 'conditions': [
59 [ 'os_posix == 1 and OS != "mac"', {
60 'stub_cdm_binary_files%': [
61 '<(PRODUCT_DIR)/libstubcdm.so',
ddorwin 2015/04/03 19:53:02 On Linux, at least, we cannot just rename the file
jrummell 2015/04/03 23:26:22 Done.
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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 173 {
134 # GN version: //third_party/widevine/cdm:binaries 174 # GN version: //third_party/widevine/cdm:binaries
135 'target_name': 'widevine_cdm_binaries', 175 'target_name': 'widevine_cdm_binaries',
136 'type': 'none', 176 'type': 'none',
137 'conditions': [ 177 'conditions': [
138 [ 'OS=="mac"', { 178 [ 'OS=="mac"', {
139 'xcode_settings': { 179 'xcode_settings': {
140 'COPY_PHASE_STRIP': 'NO', 180 'COPY_PHASE_STRIP': 'NO',
141 } 181 }
142 }], 182 }],
183 [ 'branding == "Chrome"', {
184 'copies': [{
185 # TODO(ddorwin): Do we need a sub-directory? We either need a
186 # sub-directory or to rename manifest.json before we can copy it.
187 'destination': '<(PRODUCT_DIR)',
188 'files': [ '<@(widevine_cdm_binary_files)' ],
189 }],
190 }],
191 [ 'branding != "Chrome" and OS != "android" and enable_widevine==1', {
192 'dependencies': [
193 '<(DEPTH)/media/media.gyp:stubcdm',
ddorwin 2015/04/03 02:06:56 Regarding your build failure, perhaps this is some
jrummell 2015/04/03 23:26:22 I think linking is pulling the original name out o
194 ],
195 'actions': [{
196 'action_name': 'copy_with_rename',
197 'inputs': [
198 'copy_with_rename.py',
199 '<@(stub_cdm_binary_files)',
200 ],
201 'outputs': [
202 '<@(widevine_cdm_binary_files)',
203 ],
204 'action': ['python', 'copy_with_rename.py',
205 '<@(stub_cdm_binary_files)',
206 '<@(widevine_cdm_binary_files)'],
207 }],
208 }],
143 ], 209 ],
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 }, 210 },
151 { 211 {
152 'target_name': 'widevine_test_license_server', 212 'target_name': 'widevine_test_license_server',
153 'type': 'none', 213 'type': 'none',
154 'conditions': [ 214 'conditions': [
155 [ 'branding == "Chrome" and OS == "linux"', { 215 [ 'branding == "Chrome" and OS == "linux"', {
156 'dependencies': [ 216 'dependencies': [
157 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy p:test_license_server', 217 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy p:test_license_server',
158 ], 218 ],
159 }], 219 }],
160 ], 220 ],
161 }, 221 },
162 ], 222 ],
163 } 223 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698