diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 05:26:59 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 05:26:59 +0000 |
commit | 8242888470877d61037bcf0e3a959db92989d728 (patch) | |
tree | 3538934b5a882da982601386daab0d808a49935f /third_party | |
parent | 883f42a0871d58be243e546fd9b9449822679599 (diff) | |
download | chromium_src-8242888470877d61037bcf0e3a959db92989d728.zip chromium_src-8242888470877d61037bcf0e3a959db92989d728.tar.gz chromium_src-8242888470877d61037bcf0e3a959db92989d728.tar.bz2 |
Add widevine and extensions resources to GN build.
Fix up some references in content and webkit for targets that now exist.
TBR=hclam@chromium.org
Review URL: https://codereview.chromium.org/344873006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/widevine/cdm/BUILD.gn | 102 | ||||
-rw-r--r-- | third_party/widevine/cdm/widevine_cdm.gyp | 3 |
2 files changed, 105 insertions, 0 deletions
diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn new file mode 100644 index 0000000..79fad228 --- /dev/null +++ b/third_party/widevine/cdm/BUILD.gn @@ -0,0 +1,102 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +widevine_arch = cpu_arch +if (widevine_arch == "x86") { + widevine_arch = "ia32" +} + +if (is_android) { + # Always available on Android regardless of branding. + widevine_cdm_version_h_file = "android/widevine_cdm_version.h" + widevine_cdm_binary_files = [] +} else if (is_chrome_branded) { + if (is_chromeos) { + 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) { + 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 = [ + "win/$widevine_arch/widevinecdm.dll", + "win/$widevine_arch/widevinecdm.dll.lib", + ] + } else if (is_mac) { + widevine_cdm_version_h_file = + "mac/$widevine_arch/widevine_cdm_version.h" + widevine_cdm_binary_files = [ + "mac/$widevine_arch/libwidevinecdm.dylib", + ] + } else { + # Other platforms, use the default one. + widevine_cdm_version_h_file = "widevine_cdm_version.h" + widevine_cdm_binary_files = [] + } +} else { + # No branding, use the default one. + widevine_cdm_version_h_file = "widevine_cdm_version.h" + widevine_cdm_binary_files = [] +} + +# GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h +copy("version_h") { + sources = [ widevine_cdm_version_h_file ] + # TODO(brettw) this should go into target_out_dir and callers should include + # it from there. This requires, however, renaming the default + # widevine_cdm_version.h in this directory to avoid conflicts. + outputs = [ "$root_gen_dir/widevine_cdm_version.h" ] +} + +# GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_binaries +if (widevine_cdm_binary_files == []) { + group("binaries") { + # NOP + } +} else { + copy("binaries") { + sources = widevine_cdm_binary_files + outputs = [ "$root_out_dir/{{source_file_part}}" ] + # TODO(GYP) + # 'COPY_PHASE_STRIP': 'NO', + } +} + +source_set("adapter") { + if (is_chrome_branded) { + deps = [ + ":widevine_cdm_version_h", + ":widevine_cdm_binaries", + "//ppapi:ppapi_cpp", + #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) + ] + } + + if (is_linux) { + libs = [ "$root_out_dir/libwidevinecdm.sp" ] + } else if (is_win) { + libs = [ "$root_out_dir/widevinecdm.dll.lib" ] + } else if (is_mac) { + libs = [ "$root_out_dir/libwidevinecdm.dylib" ] + } +} + +# This target exists for tests to depend on that pulls in a runtime dependency +# on the license server. +source_set("widevine_test_license_server") { + if (is_chrome_branded && is_linux) { + deps = [ + # TODO(GYP) + #"//third_party/widevine/test/license_server/license_server.gyp:test_license_server" + ] + } +} diff --git a/third_party/widevine/cdm/widevine_cdm.gyp b/third_party/widevine/cdm/widevine_cdm.gyp index 674038b..48896c1 100644 --- a/third_party/widevine/cdm/widevine_cdm.gyp +++ b/third_party/widevine/cdm/widevine_cdm.gyp @@ -50,6 +50,7 @@ # anything to be done in this file (instead of a higher-level .gyp file). 'targets': [ { + # GN version: //third_party/widevine/cdm:adapter 'target_name': 'widevinecdmadapter', 'type': 'none', 'conditions': [ @@ -84,6 +85,7 @@ ], }, { + # GN version: //third_party/widevine/cdm:version_h 'target_name': 'widevine_cdm_version_h', 'type': 'none', 'copies': [{ @@ -92,6 +94,7 @@ }], }, { + # GN version: //third_party/widevine/cdm:binaries 'target_name': 'widevine_cdm_binaries', 'type': 'none', 'conditions': [ |