| 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 widevine_arch = cpu_arch | 5 widevine_arch = cpu_arch |
| 6 if (widevine_arch == "x86") { | 6 if (widevine_arch == "x86") { |
| 7 widevine_arch = "ia32" | 7 widevine_arch = "ia32" |
| 8 } | 8 } |
| 9 | 9 |
| 10 if (is_android) { | 10 if (is_android) { |
| 11 # Always available on Android regardless of branding. | 11 # Always available on Android regardless of branding. |
| 12 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" | 12 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" |
| 13 widevine_cdm_binary_files = [] | 13 widevine_cdm_binary_files = [] |
| 14 } else if (is_chrome_branded) { | 14 } else if (is_chrome_branded) { |
| 15 if (is_chromeos) { | 15 if (is_chromeos) { |
| 16 widevine_cdm_version_h_file = | 16 widevine_cdm_version_h_file = |
| 17 "chromeos/$widevine_arch/widevine_cdm_version.h" | 17 "chromeos/$widevine_arch/widevine_cdm_version.h" |
| 18 widevine_cdm_binary_files = [ | 18 widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ] |
| 19 "chromeos/$widevine_arch/libwidevinecdm.so", | |
| 20 ] | |
| 21 } else if (is_linux) { | 19 } else if (is_linux) { |
| 22 widevine_cdm_version_h_file = | 20 widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h" |
| 23 "linux/$widevine_arch/widevine_cdm_version.h" | 21 widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ] |
| 24 widevine_cdm_binary_files = [ | |
| 25 "linux/$widevine_arch/libwidevinecdm.so", | |
| 26 ] | |
| 27 } else if (is_win) { | 22 } else if (is_win) { |
| 28 widevine_cdm_version_h_file = | 23 widevine_cdm_version_h_file = "win/$widevine_arch/widevine_cdm_version.h" |
| 29 "win/$widevine_arch/widevine_cdm_version.h" | |
| 30 widevine_cdm_binary_files = [ | 24 widevine_cdm_binary_files = [ |
| 31 "win/$widevine_arch/widevinecdm.dll", | 25 "win/$widevine_arch/widevinecdm.dll", |
| 32 "win/$widevine_arch/widevinecdm.dll.lib", | 26 "win/$widevine_arch/widevinecdm.dll.lib", |
| 33 ] | 27 ] |
| 34 } else if (is_mac) { | 28 } else if (is_mac) { |
| 35 widevine_cdm_version_h_file = | 29 widevine_cdm_version_h_file = "mac/$widevine_arch/widevine_cdm_version.h" |
| 36 "mac/$widevine_arch/widevine_cdm_version.h" | 30 widevine_cdm_binary_files = [ "mac/$widevine_arch/libwidevinecdm.dylib" ] |
| 37 widevine_cdm_binary_files = [ | |
| 38 "mac/$widevine_arch/libwidevinecdm.dylib", | |
| 39 ] | |
| 40 } else { | 31 } else { |
| 41 # Other platforms, use the default one. | 32 # Other platforms, use the default one. |
| 42 widevine_cdm_version_h_file = "widevine_cdm_version.h" | 33 widevine_cdm_version_h_file = "widevine_cdm_version.h" |
| 43 widevine_cdm_binary_files = [] | 34 widevine_cdm_binary_files = [] |
| 44 } | 35 } |
| 45 } else { | 36 } else { |
| 46 # No branding, use the default one. | 37 # No branding, use the default one. |
| 47 widevine_cdm_version_h_file = "widevine_cdm_version.h" | 38 widevine_cdm_version_h_file = "widevine_cdm_version.h" |
| 48 widevine_cdm_binary_files = [] | 39 widevine_cdm_binary_files = [] |
| 49 } | 40 } |
| 50 | 41 |
| 51 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h | 42 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h |
| 52 copy("version_h") { | 43 copy("version_h") { |
| 53 sources = [ widevine_cdm_version_h_file ] | 44 sources = [ |
| 45 widevine_cdm_version_h_file, |
| 46 ] |
| 47 |
| 54 # TODO(brettw) this should go into target_out_dir and callers should include | 48 # TODO(brettw) this should go into target_out_dir and callers should include |
| 55 # it from there. This requires, however, renaming the default | 49 # it from there. This requires, however, renaming the default |
| 56 # widevine_cdm_version.h in this directory to avoid conflicts. | 50 # widevine_cdm_version.h in this directory to avoid conflicts. |
| 57 outputs = [ "$root_gen_dir/widevine_cdm_version.h" ] | 51 outputs = [ "$root_gen_dir/widevine_cdm_version.h" ] |
| 58 } | 52 } |
| 59 | 53 |
| 60 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_binaries | 54 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_binaries |
| 61 if (widevine_cdm_binary_files == []) { | 55 if (widevine_cdm_binary_files == []) { |
| 62 group("binaries") { | 56 group("binaries") { |
| 63 # NOP | 57 # NOP |
| 64 } | 58 } |
| 65 } else { | 59 } else { |
| 66 copy("binaries") { | 60 copy("binaries") { |
| 67 sources = widevine_cdm_binary_files | 61 sources = widevine_cdm_binary_files |
| 68 outputs = [ "$root_out_dir/{{source_file_part}}" ] | 62 outputs = [ "$root_out_dir/{{source_file_part}}" ] |
| 63 |
| 69 # TODO(GYP) | 64 # TODO(GYP) |
| 70 # 'COPY_PHASE_STRIP': 'NO', | 65 # 'COPY_PHASE_STRIP': 'NO', |
| 71 } | 66 } |
| 72 } | 67 } |
| 73 | 68 |
| 74 source_set("adapter") { | 69 source_set("adapter") { |
| 75 if (is_chrome_branded) { | 70 if (is_chrome_branded) { |
| 76 deps = [ | 71 deps = [ |
| 77 ":version_h", | 72 ":version_h", |
| 78 ":binaries", | 73 ":binaries", |
| 79 "//ppapi:ppapi_cpp", | 74 "//ppapi:ppapi_cpp", |
| 75 |
| 80 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) | 76 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) |
| 81 ] | 77 ] |
| 82 } | 78 } |
| 83 | 79 |
| 84 if (is_linux) { | 80 if (is_linux) { |
| 85 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] | 81 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] |
| 86 } else if (is_win) { | 82 } else if (is_win) { |
| 87 libs = [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] | 83 libs = [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] |
| 88 } else if (is_mac) { | 84 } else if (is_mac) { |
| 89 libs = [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] | 85 libs = [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] |
| 90 } | 86 } |
| 91 } | 87 } |
| 92 | 88 |
| 93 # This target exists for tests to depend on that pulls in a runtime dependency | 89 # This target exists for tests to depend on that pulls in a runtime dependency |
| 94 # on the license server. | 90 # on the license server. |
| 95 source_set("widevine_test_license_server") { | 91 source_set("widevine_test_license_server") { |
| 96 if (is_chrome_branded && is_linux) { | 92 if (is_chrome_branded && is_linux) { |
| 97 deps = [ | 93 deps = [ |
| 98 # TODO(GYP) | 94 # TODO(GYP) |
| 99 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" | 95 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" |
| 100 ] | 96 ] |
| 101 } | 97 } |
| 102 } | 98 } |
| OLD | NEW |