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

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

Issue 2000513002: media: Bundle Widevine CDM on Win/Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 4 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
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/version.gni") # TODO layering violation 7 import("//chrome/version.gni") # TODO layering violation
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("//third_party/widevine/cdm/widevine.gni") 10 import("//third_party/widevine/cdm/widevine.gni")
11 11
12 widevine_arch = current_cpu 12 widevine_arch = current_cpu
13 if (widevine_arch == "x86") { 13 if (widevine_arch == "x86") {
14 widevine_arch = "ia32" 14 widevine_arch = "ia32"
15 } 15 }
16 16
17 widevine_cdm_binary_files = []
18 widevine_cdm_manifest_file = []
19
17 if (is_android) { 20 if (is_android) {
18 # Always available on Android regardless of branding. 21 # Always available on Android regardless of branding.
19 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" 22 widevine_cdm_version_h_file = "android/widevine_cdm_version.h"
20 widevine_cdm_binary_files = []
21 } else if (is_chrome_branded) { 23 } else if (is_chrome_branded) {
22 if (is_chromeos) { 24 if (is_chromeos) {
23 widevine_cdm_version_h_file = 25 widevine_cdm_version_h_file =
24 "chromeos/$widevine_arch/widevine_cdm_version.h" 26 "chromeos/$widevine_arch/widevine_cdm_version.h"
25 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] 27 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
26 } else if (is_linux) { 28 } else if (is_linux) {
27 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" 29 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
28 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ] 30 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
29 } else if (is_win) { 31 } else if (is_win) {
30 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" 32 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h"
31 widevine_cdm_binary_files = [ 33 widevine_cdm_binary_files = [
32 "win/$widevine_arch/widevinecdm.dll", 34 "win/$widevine_arch/widevinecdm.dll",
33 "win/$widevine_arch/widevinecdm.dll.lib", 35 "win/$widevine_arch/widevinecdm.dll.lib",
34 ] 36 ]
37 widevine_cdm_manifest_file = [ "win/$widevine_arch/manifest.json" ]
35 } else if (is_mac) { 38 } else if (is_mac) {
36 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" 39 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h"
37 widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] 40 widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ]
41 widevine_cdm_manifest_file = [ "mac/$widevine_arch/manifest.json" ]
38 } else { 42 } else {
39 # Other platforms, use the default one. 43 # Other platforms, use the default one.
40 widevine_cdm_version_h_file = "widevine_cdm_version.h" 44 widevine_cdm_version_h_file = "widevine_cdm_version.h"
41 widevine_cdm_binary_files = []
42 } 45 }
43 } else if (enable_widevine) { 46 } else if (enable_widevine) {
44 widevine_cdm_version_h_file = "stub/widevine_cdm_version.h" 47 widevine_cdm_version_h_file = "stub/widevine_cdm_version.h"
45 widevine_cdm_binary_files = []
46 } else { 48 } else {
47 # No branding, use the default one. 49 # No branding, use the default one.
48 widevine_cdm_version_h_file = "widevine_cdm_version.h" 50 widevine_cdm_version_h_file = "widevine_cdm_version.h"
49 widevine_cdm_binary_files = []
50 } 51 }
51 52
52 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h 53 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h
53 copy("version_h") { 54 copy("version_h") {
54 sources = [ 55 sources = [
55 widevine_cdm_version_h_file, 56 widevine_cdm_version_h_file,
56 ] 57 ]
57 58
58 # TODO(brettw) this should go into target_out_dir and callers should include 59 # TODO(brettw) this should go into target_out_dir and callers should include
59 # it from there. This requires, however, renaming the default 60 # it from there. This requires, however, renaming the default
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 # Note GYP sets rpath but this is set by default on shared libraries in 106 # Note GYP sets rpath but this is set by default on shared libraries in
106 # the GN build. 107 # the GN build.
107 } 108 }
108 } 109 }
109 } else { 110 } else {
110 group("widevinecdm") { 111 group("widevinecdm") {
111 # NOP 112 # NOP
112 } 113 }
113 } 114 }
114 115
116 if (widevine_cdm_manifest_file != []) {
117 copy("widevine_cdm_manifest") {
118 sources = widevine_cdm_manifest_file
119 outputs = [
120 "$root_out_dir/WidevineCdm/{{source_file_part}}",
121 ]
122 }
123 } else {
124 group("widevine_cdm_manifest") {
125 # NOP
126 }
127 }
128
115 if ((is_chrome_branded || enable_widevine) && enable_pepper_cdms) { 129 if ((is_chrome_branded || enable_widevine) && enable_pepper_cdms) {
116 # Produce and compile the .rc file. 130 # Produce and compile the .rc file.
117 process_version("widevinecdmadapter_resources") { 131 process_version("widevinecdmadapter_resources") {
118 visibility = [ ":*" ] 132 visibility = [ ":*" ]
119 template_file = chrome_version_rc_template 133 template_file = chrome_version_rc_template
120 sources = [ 134 sources = [
121 "BRANDING", 135 "BRANDING",
122 "widevinecdmadapter.ver", 136 "widevinecdmadapter.ver",
123 ] 137 ]
124 output = "$target_gen_dir/widevinecdmadapter_version.rc" 138 output = "$target_gen_dir/widevinecdmadapter_version.rc"
125 } 139 }
126 140
127 ppapi_cdm_adapter("widevinecdmadapter") { 141 ppapi_cdm_adapter("widevinecdmadapter") {
128 defines = [] 142 defines = []
129 output_dir = "$root_out_dir/$widevine_cdm_path" 143 output_dir = "$root_out_dir/$widevine_cdm_path"
130 deps = [ 144 deps = [
131 ":version_h", 145 ":version_h",
146 ":widevine_cdm_manifest",
132 ":widevinecdm", 147 ":widevinecdm",
133 ":widevinecdmadapter_resources", 148 ":widevinecdmadapter_resources",
134 ] 149 ]
135 150
136 if (is_linux) { 151 if (is_linux) {
137 ldflags = 152 ldflags =
138 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", 153 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
139 root_build_dir) ] 154 root_build_dir) ]
140 } else if (is_win) { 155 } else if (is_win) {
141 ldflags = 156 ldflags =
(...skipping 15 matching lines...) Expand all
157 # on the license server. 172 # on the license server.
158 source_set("widevine_test_license_server") { 173 source_set("widevine_test_license_server") {
159 if (is_chrome_branded && is_linux) { 174 if (is_chrome_branded && is_linux) {
160 deps = [ 175 deps = [
161 # TODO(jrummell) 176 # TODO(jrummell)
162 # This target should be removed and targets should have data_deps on this target: 177 # This target should be removed and targets should have data_deps on this target:
163 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen se_server" 178 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen se_server"
164 ] 179 ]
165 } 180 }
166 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698