Index: third_party/widevine/cdm/BUILD.gn |
diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn |
index d32229446eb962303b8758a6e58905c12794bce9..bce90d2c4bfdd80251f51fc826483a631d0cf0ef 100644 |
--- a/third_party/widevine/cdm/BUILD.gn |
+++ b/third_party/widevine/cdm/BUILD.gn |
@@ -2,6 +2,10 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//build/config/features.gni") |
+import("//chrome/version.gni") |
ddorwin
2015/02/25 01:18:32
Same TODO?
|
+import("//media/cdm/ppapi/cdm_adapter.gni") |
+ |
widevine_arch = current_cpu |
if (widevine_arch == "x86") { |
widevine_arch = "ia32" |
@@ -70,26 +74,46 @@ if (widevine_cdm_binary_files == []) { |
} |
} |
-source_set("adapter") { |
- if (is_chrome_branded) { |
+if (is_chrome_branded && enable_pepper_cdms) { |
+ adapter_resource_file = "$target_gen_dir/widevinecdmadapter_version.rc" |
+ |
+ # Produce the .rc file. |
+ process_version("adapter_resources") { |
+ visibility = [ ":*" ] |
ddorwin
2015/02/25 01:18:32
This is not in the clearkey BUILD.gn. Why do we ne
brettw
2015/02/25 01:32:42
Just nice hygiene. I added it in the other place.
|
+ sources = [ |
+ "BRANDING", |
+ "widevinecdmadapter.ver", |
+ ] |
+ output = adapter_resource_file |
+ } |
+ |
+ cdm_adapter("adapter") { |
+ sources = [ |
+ adapter_resource_file, |
+ ] |
deps = [ |
- ":version_h", |
+ ":adapter_resources", |
":binaries", |
+ ":version_h", |
"//ppapi/cpp", |
- |
- #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) |
] |
+ libs = [ "rt" ] |
ddorwin
2015/02/25 01:18:32
The GYP file only did this on Linux. Is this a nop
brettw
2015/02/25 01:32:42
Good catch
|
if (is_linux) { |
- libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] |
+ ldflags = |
+ [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] |
} else if (is_win) { |
- libs = |
+ ldflags = |
[ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] |
} else if (is_mac) { |
- libs = |
+ ldflags = |
[ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] |
} |
} |
+} else { |
+ # Placeholder when we're not compiling the adapter. |
+ group("adapter") { |
ddorwin
2015/02/25 01:18:32
I assume this is the equivalent of 'type': 'none'
brettw
2015/02/25 01:32:42
Yes
|
+ } |
} |
# This target exists for tests to depend on that pulls in a runtime dependency |