| 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 import("//chrome/version.gni") |
| 7 import("//media/cdm/ppapi/cdm_adapter.gni") |
| 8 |
| 5 widevine_arch = current_cpu | 9 widevine_arch = current_cpu |
| 6 if (widevine_arch == "x86") { | 10 if (widevine_arch == "x86") { |
| 7 widevine_arch = "ia32" | 11 widevine_arch = "ia32" |
| 8 } | 12 } |
| 9 | 13 |
| 10 if (is_android) { | 14 if (is_android) { |
| 11 # Always available on Android regardless of branding. | 15 # Always available on Android regardless of branding. |
| 12 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" | 16 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" |
| 13 widevine_cdm_binary_files = [] | 17 widevine_cdm_binary_files = [] |
| 14 } else if (is_chrome_branded) { | 18 } else if (is_chrome_branded) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 sources = widevine_cdm_binary_files | 67 sources = widevine_cdm_binary_files |
| 64 outputs = [ | 68 outputs = [ |
| 65 "$root_out_dir/{{source_file_part}}", | 69 "$root_out_dir/{{source_file_part}}", |
| 66 ] | 70 ] |
| 67 | 71 |
| 68 # TODO(GYP) | 72 # TODO(GYP) |
| 69 # 'COPY_PHASE_STRIP': 'NO', | 73 # 'COPY_PHASE_STRIP': 'NO', |
| 70 } | 74 } |
| 71 } | 75 } |
| 72 | 76 |
| 73 source_set("adapter") { | 77 if (is_chrome_branded && enable_pepper_cdms) { |
| 74 if (is_chrome_branded) { | 78 adapter_resource_file = "$target_gen_dir/widevinecdmadapter_version.rc" |
| 79 |
| 80 # Produce the .rc file. |
| 81 process_version("adapter_resources") { |
| 82 visibility = [ ":*" ] |
| 83 sources = [ |
| 84 "BRANDING", |
| 85 "widevinecdmadapter.ver", |
| 86 ] |
| 87 output = adapter_resource_file |
| 88 } |
| 89 |
| 90 cdm_adapter("adapter") { |
| 91 sources = [ |
| 92 adapter_resource_file |
| 93 ] |
| 75 deps = [ | 94 deps = [ |
| 95 ":adapter_resources", |
| 96 ":binaries", |
| 76 ":version_h", | 97 ":version_h", |
| 77 ":binaries", | |
| 78 "//ppapi/cpp", | 98 "//ppapi/cpp", |
| 79 | |
| 80 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) | |
| 81 ] | 99 ] |
| 100 libs = [ "rt" ] |
| 82 | 101 |
| 83 if (is_linux) { | 102 if (is_linux) { |
| 84 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] | 103 ldflags = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir)
] |
| 85 } else if (is_win) { | 104 } else if (is_win) { |
| 86 libs = | 105 ldflags = |
| 87 [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] | 106 [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] |
| 88 } else if (is_mac) { | 107 } else if (is_mac) { |
| 89 libs = | 108 ldflags = |
| 90 [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] | 109 [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] |
| 91 } | 110 } |
| 92 } | 111 } |
| 112 } else { |
| 113 # Placeholder when we're not compiling the adapter. |
| 114 group("adapter") { |
| 115 } |
| 93 } | 116 } |
| 94 | 117 |
| 95 # This target exists for tests to depend on that pulls in a runtime dependency | 118 # This target exists for tests to depend on that pulls in a runtime dependency |
| 96 # on the license server. | 119 # on the license server. |
| 97 source_set("widevine_test_license_server") { | 120 source_set("widevine_test_license_server") { |
| 98 if (is_chrome_branded && is_linux) { | 121 if (is_chrome_branded && is_linux) { |
| 99 deps = [ | 122 deps = [ |
| 100 # TODO(GYP) | 123 # TODO(GYP) |
| 101 # This target should be removed and targets should have datadeps on this t
arget: | 124 # This target should be removed and targets should have datadeps on this t
arget: |
| 102 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" | 125 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" |
| 103 ] | 126 ] |
| 104 } | 127 } |
| 105 } | 128 } |
| OLD | NEW |