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

Unified Diff: third_party/widevine/cdm/BUILD.gn

Issue 2792743002: Use Stub CDM for building libwidevinecdmadapter.so (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/widevine/cdm/BUILD.gn
diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn
index dda97991ca4b0c533ae7a5830d9e9d9195a86811..537a623f28d51fae2099c45d3dff8827d7ce272f 100644
--- a/third_party/widevine/cdm/BUILD.gn
+++ b/third_party/widevine/cdm/BUILD.gn
@@ -23,12 +23,14 @@ if (is_android) {
widevine_cdm_version_h_file = "android/widevine_cdm_version.h"
} else if (is_chrome_branded) {
if (is_chromeos) {
+ # TODO(hmchen): Revert this change and the other in is_linux after the
+ # libwidevinecdm.so issue is fixed.
xhwang 2017/04/01 00:56:41 Please file a bug and add bug number here for trac
+ enable_widevine = true
widevine_cdm_version_h_file =
"chromeos/$widevine_arch/widevine_cdm_version.h"
- widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
} else if (is_linux) {
+ enable_widevine = true
widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
- widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
} else if (is_win) {
widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h"
widevine_cdm_binary_files = [
@@ -82,6 +84,18 @@ source_set("headers") {
]
}
+copy("copy_widevinecdm") {
+ if (is_linux) {
+ widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
+ } else if (is_chromeos) {
+ widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
+ }
+ sources = widevine_cdm_binary_files
+ outputs = [
+ "$root_out_dir/$widevine_cdm_path/{{source_file_part}}",
+ ]
+}
+
if (widevine_cdm_binary_files != []) {
copy("widevinecdm") {
sources = widevine_cdm_binary_files
@@ -93,10 +107,12 @@ if (widevine_cdm_binary_files != []) {
# 'COPY_PHASE_STRIP': 'NO',
}
} else if (enable_widevine && enable_pepper_cdms) {
- assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.")
+ if (!is_linux && !is_chromeos) {
+ assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.")
+ }
assert(!is_android, "Android should not have enable_pepper_cdms.")
shared_library("widevinecdm") {
- output_dir = "$root_out_dir/$widevine_cdm_path"
+ output_dir = "$root_out_dir/$widevine_cdm_path/stub_cdm"
sources = [
"//media/cdm/stub/stub_cdm.cc",
"//media/cdm/stub/stub_cdm.h",
@@ -106,10 +122,13 @@ if (widevine_cdm_binary_files != []) {
deps = [
":version_h",
+ ":copy_widevinecdm",
"//base",
"//build/config/sanitizers:deps",
]
+ public_deps = [ ":copy_widevinecdm" ]
+
if (is_mac) {
ldflags = [
# Not to strip important symbols by -Wl,-dead_strip.
@@ -167,7 +186,7 @@ if ((is_chrome_branded || enable_widevine) && enable_pepper_cdms) {
if (is_linux) {
ldflags =
- [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
+ [ rebase_path("$root_out_dir/$widevine_cdm_path/stub_cdm/libwidevinecdm.so",
root_build_dir) ]
} else if (is_win) {
ldflags =
« 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