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