| 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..3fce784ad36a59bdcca36b6239cac6b1cb12110a 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") # TODO layering violation
|
| +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 = [ ":*" ]
|
| + 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)
|
| ]
|
|
|
| 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) ]
|
| + libs = [ "rt" ]
|
| } 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") {
|
| + }
|
| }
|
|
|
| # This target exists for tests to depend on that pulls in a runtime dependency
|
|
|