Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/features.gni") | |
| 6 | |
| 5 widevine_arch = cpu_arch | 7 widevine_arch = cpu_arch |
| 6 if (widevine_arch == "x86") { | 8 if (widevine_arch == "x86") { |
| 7 widevine_arch = "ia32" | 9 widevine_arch = "ia32" |
| 8 } | 10 } |
| 9 | 11 |
| 10 if (is_android) { | 12 if (enable_widevine_cdm) { |
| 11 # Always available on Android regardless of branding. | 13 if (is_android) { |
| 12 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" | 14 # Always available on Android regardless of branding. |
|
ddorwin
2014/12/15 18:31:06
Remove.
sandersd (OOO until July 31)
2014/12/15 21:51:22
Done.
| |
| 13 widevine_cdm_binary_files = [] | 15 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" |
| 14 } else if (is_chrome_branded) { | 16 widevine_cdm_binary_files = [] |
| 15 if (is_chromeos) { | 17 } else if (is_chromeos) { |
| 16 widevine_cdm_version_h_file = | 18 widevine_cdm_version_h_file = |
| 17 "chromeos/$widevine_arch/widevine_cdm_version.h" | 19 "chromeos/$widevine_arch/widevine_cdm_version.h" |
| 18 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] | 20 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] |
| 19 } else if (is_linux) { | 21 } else if (is_linux) { |
| 20 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" | 22 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" |
| 21 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ] | 23 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ] |
| 22 } else if (is_win) { | 24 } else if (is_win) { |
| 23 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" | 25 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" |
| 24 widevine_cdm_binary_files = [ | 26 widevine_cdm_binary_files = [ |
| 25 "win/$widevine_arch/widevinecdm.dll", | 27 "win/$widevine_arch/widevinecdm.dll", |
| 26 "win/$widevine_arch/widevinecdm.dll.lib", | 28 "win/$widevine_arch/widevinecdm.dll.lib", |
| 27 ] | 29 ] |
| 28 } else if (is_mac) { | 30 } else if (is_mac) { |
| 29 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" | 31 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" |
| 30 widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] | 32 widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] |
| 31 } else { | 33 } else { |
| 32 # Other platforms, use the default one. | 34 # Other platforms, use the default one. |
| 33 widevine_cdm_version_h_file = "widevine_cdm_version.h" | 35 widevine_cdm_version_h_file = "widevine_cdm_version.h" |
| 34 widevine_cdm_binary_files = [] | 36 widevine_cdm_binary_files = [] |
| 35 } | 37 } |
| 36 } else { | 38 } else { |
| 37 # No branding, use the default one. | 39 # No CDM, use the default one. |
|
ddorwin
2014/12/15 18:31:06
# Not enabled - use the empty file.
sandersd (OOO until July 31)
2014/12/15 21:51:22
Done.
| |
| 38 widevine_cdm_version_h_file = "widevine_cdm_version.h" | 40 widevine_cdm_version_h_file = "widevine_cdm_version.h" |
| 39 widevine_cdm_binary_files = [] | 41 widevine_cdm_binary_files = [] |
| 40 } | 42 } |
| 41 | 43 |
| 42 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h | 44 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h |
| 43 copy("version_h") { | 45 copy("version_h") { |
| 44 sources = [ | 46 sources = [ |
| 45 widevine_cdm_version_h_file, | 47 widevine_cdm_version_h_file, |
| 46 ] | 48 ] |
| 47 | 49 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 64 outputs = [ | 66 outputs = [ |
| 65 "$root_out_dir/{{source_file_part}}", | 67 "$root_out_dir/{{source_file_part}}", |
| 66 ] | 68 ] |
| 67 | 69 |
| 68 # TODO(GYP) | 70 # TODO(GYP) |
| 69 # 'COPY_PHASE_STRIP': 'NO', | 71 # 'COPY_PHASE_STRIP': 'NO', |
| 70 } | 72 } |
| 71 } | 73 } |
| 72 | 74 |
| 73 source_set("adapter") { | 75 source_set("adapter") { |
| 74 if (is_chrome_branded) { | 76 if (enable_widevine_cdm) { |
| 75 deps = [ | 77 deps = [ |
| 76 ":version_h", | 78 ":version_h", |
| 77 ":binaries", | 79 ":binaries", |
| 78 "//ppapi:ppapi_cpp", | 80 "//ppapi:ppapi_cpp", |
| 79 | 81 |
| 80 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) | 82 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) |
| 81 ] | 83 ] |
| 82 } | 84 } |
| 83 | 85 |
| 84 if (is_linux) { | 86 if (is_linux) { |
| 85 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] | 87 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] |
| 86 } else if (is_win) { | 88 } else if (is_win) { |
| 87 libs = [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] | 89 libs = [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] |
| 88 } else if (is_mac) { | 90 } else if (is_mac) { |
| 89 libs = [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] | 91 libs = [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] |
| 90 } | 92 } |
| 91 } | 93 } |
| 92 | 94 |
| 93 # This target exists for tests to depend on that pulls in a runtime dependency | 95 # This target exists for tests to depend on that pulls in a runtime dependency |
| 94 # on the license server. | 96 # on the license server. |
| 95 source_set("widevine_test_license_server") { | 97 source_set("widevine_test_license_server") { |
| 96 if (is_chrome_branded && is_linux) { | 98 if (enable_widevine_cdm && is_linux) { |
| 97 deps = [ | 99 deps = [ |
| 98 # TODO(GYP) | 100 # TODO(GYP) |
| 99 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen se_server" | 101 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen se_server" |
| 100 ] | 102 ] |
| 101 } | 103 } |
| 102 } | 104 } |
| OLD | NEW |