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

Side by Side Diff: third_party/widevine/cdm/BUILD.gn

Issue 2893853003: Revert of Use Stub CDM for building libwidevinecdmadapter.so (Closed)
Patch Set: Rebase and resolve conflicts. Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//chrome/process_version_rc_template.gni") 7 import("//chrome/process_version_rc_template.gni")
8 import("//media/cdm/ppapi/cdm_paths.gni") 8 import("//media/cdm/ppapi/cdm_paths.gni")
9 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni") 9 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni")
10 import("//ppapi/features/features.gni") 10 import("//ppapi/features/features.gni")
11 import("//third_party/widevine/cdm/widevine.gni") 11 import("//third_party/widevine/cdm/widevine.gni")
12 12
13 widevine_arch = current_cpu 13 widevine_arch = current_cpu
14 if (widevine_arch == "x86") { 14 if (widevine_arch == "x86") {
15 widevine_arch = "ia32" 15 widevine_arch = "ia32"
16 } 16 }
17 17
18 widevine_cdm_binary_files = [] 18 widevine_cdm_binary_files = []
19 widevine_cdm_manifest_file = [] 19 widevine_cdm_manifest_file = []
20 20
21 # Due to crbug.com/707488, in linux and chromeos chrome, we temporarily use
22 # stub cdm for building cdm adapter and copy the real cdm after that.
23 # The stub libwidevinecdm.so is in the sub-directory "./stub_cdm" to avoid
24 # GN's complaint about generating the same output in two targets.
25 # TODO(hmchen): Revert this change after crbug.com/707488 fixed.
26 use_stub_cdm_for_chrome = false
27 if (is_chrome_branded && is_linux) {
28 use_stub_cdm_for_chrome = true
29 }
30
31 if (is_android) { 21 if (is_android) {
32 # Always available on Android regardless of branding. 22 # Always available on Android regardless of branding.
33 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" 23 widevine_cdm_version_h_file = "android/widevine_cdm_version.h"
34 } else if (is_chrome_branded) { 24 } else if (is_chrome_branded) {
35 if (is_chromeos) { 25 if (is_chromeos) {
36 widevine_cdm_version_h_file = 26 widevine_cdm_version_h_file =
37 "chromeos/$widevine_arch/widevine_cdm_version.h" 27 "chromeos/$widevine_arch/widevine_cdm_version.h"
38 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] 28 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
39 } else if (is_linux) { 29 } else if (is_linux) {
40 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" 30 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 "widevine_cdm_common.h", 75 "widevine_cdm_common.h",
86 ] 76 ]
87 77
88 public_deps = [ 78 public_deps = [
89 ":version_h", # Forward permission to use version header. 79 ":version_h", # Forward permission to use version header.
90 "//media:media_features", 80 "//media:media_features",
91 "//ppapi/features", 81 "//ppapi/features",
92 ] 82 ]
93 } 83 }
94 84
95 if (use_stub_cdm_for_chrome) { 85 if (widevine_cdm_binary_files != []) {
96 widevine_cdm_binary_files = []
97 copy("copy_widevinecdm") {
98 if (is_chromeos) {
99 widevine_cdm = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
100 } else if (is_linux) {
101 widevine_cdm = [ "linux/$widevine_arch/libwidevinecdm.so" ]
102 }
103 sources = widevine_cdm
104 outputs = [
105 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}",
106 ]
107 }
108
109 shared_library("widevinecdm") {
110 output_dir = "$root_out_dir/$widevine_cdm_path/stub_cdm"
111 sources = [
112 "//media/cdm/stub/stub_cdm.cc",
113 "//media/cdm/stub/stub_cdm.h",
114 ]
115
116 defines = [ "CDM_IMPLEMENTATION" ]
117
118 deps = [
119 ":version_h",
120 ":copy_widevinecdm",
121 "//base",
122 "//build/config:exe_and_shlib_deps",
123 ]
124
125 public_deps = [ ":copy_widevinecdm" ]
126 cflags = [ "-fvisibility=hidden" ]
127 }
128 } else if (widevine_cdm_binary_files != []) {
129 copy("widevinecdm") { 86 copy("widevinecdm") {
130 sources = widevine_cdm_binary_files 87 sources = widevine_cdm_binary_files
131 outputs = [ 88 outputs = [
132 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}", 89 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}",
133 ] 90 ]
134 91
135 # TODO(jrummell) 92 # TODO(jrummell)
136 # 'COPY_PHASE_STRIP': 'NO', 93 # 'COPY_PHASE_STRIP': 'NO',
137 } 94 }
138 } else if (enable_widevine && enable_pepper_cdms) { 95 } else if (enable_widevine && enable_pepper_cdms) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 deps = [ 158 deps = [
202 ":version_h", 159 ":version_h",
203 ":widevinecdm", 160 ":widevinecdm",
204 ":widevinecdmadapter_resources", 161 ":widevinecdmadapter_resources",
205 ] 162 ]
206 data_deps = [ 163 data_deps = [
207 ":widevine_cdm_manifest", 164 ":widevine_cdm_manifest",
208 ":widevinecdm", 165 ":widevinecdm",
209 ] 166 ]
210 167
211 if (is_linux && !use_stub_cdm_for_chrome) { 168 if (is_linux) {
212 ldflags = 169 ldflags =
213 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", 170 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
214 root_build_dir) ] 171 root_build_dir) ]
215 } else if (is_win) { 172 } else if (is_win) {
216 ldflags = 173 ldflags =
217 [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib", 174 [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib",
218 root_build_dir) ] 175 root_build_dir) ]
219 } else if (is_mac) { 176 } else if (is_mac) {
220 ldflags = 177 ldflags =
221 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", 178 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib",
(...skipping 25 matching lines...) Expand all
247 "../scripts/signer.py", 204 "../scripts/signer.py",
248 ] 205 ]
249 outputs = [ 206 outputs = [
250 "$root_out_dir/installer/widevine/{{source_file_part}}", 207 "$root_out_dir/installer/widevine/{{source_file_part}}",
251 ] 208 ]
252 } 209 }
253 } else { 210 } else {
254 group("widevine_signature_scripts") { 211 group("widevine_signature_scripts") {
255 } 212 }
256 } 213 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698