| 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/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 7 import("//chrome/version.gni") # TODO layering violation | 7 import("//chrome/version.gni") # TODO layering violation |
| 8 import("//media/cdm/ppapi/cdm_paths.gni") |
| 8 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni") | 9 import("//media/cdm/ppapi/ppapi_cdm_adapter.gni") |
| 9 import("//third_party/widevine/cdm/widevine.gni") | 10 import("//third_party/widevine/cdm/widevine.gni") |
| 10 | 11 |
| 11 widevine_arch = current_cpu | 12 widevine_arch = current_cpu |
| 12 if (widevine_arch == "x86") { | 13 if (widevine_arch == "x86") { |
| 13 widevine_arch = "ia32" | 14 widevine_arch = "ia32" |
| 14 } | 15 } |
| 15 | 16 |
| 16 if (is_android) { | 17 if (is_android) { |
| 17 # Always available on Android regardless of branding. | 18 # Always available on Android regardless of branding. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 outputs = [ | 61 outputs = [ |
| 61 "$root_gen_dir/widevine_cdm_version.h", | 62 "$root_gen_dir/widevine_cdm_version.h", |
| 62 ] | 63 ] |
| 63 } | 64 } |
| 64 | 65 |
| 65 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevinecdm | 66 # GYP version: third_party/widevine/cdm/widevine_cdm.gyp:widevinecdm |
| 66 if (widevine_cdm_binary_files != []) { | 67 if (widevine_cdm_binary_files != []) { |
| 67 copy("widevinecdm") { | 68 copy("widevinecdm") { |
| 68 sources = widevine_cdm_binary_files | 69 sources = widevine_cdm_binary_files |
| 69 outputs = [ | 70 outputs = [ |
| 70 "$root_out_dir/{{source_file_part}}", | 71 "$root_out_dir/$widevine_cdm_path/{{source_file_part}}", |
| 71 ] | 72 ] |
| 72 | 73 |
| 73 # TODO(jrummell) | 74 # TODO(jrummell) |
| 74 # 'COPY_PHASE_STRIP': 'NO', | 75 # 'COPY_PHASE_STRIP': 'NO', |
| 75 } | 76 } |
| 76 } else if (enable_widevine && enable_pepper_cdms) { | 77 } else if (enable_widevine && enable_pepper_cdms) { |
| 77 assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.") | 78 assert(!is_chrome_branded, "Branded Chrome should have binary files to copy.") |
| 78 assert(!is_android, "Android should not have enable_pepper_cdms.") | 79 assert(!is_android, "Android should not have enable_pepper_cdms.") |
| 79 shared_library("widevinecdm") { | 80 shared_library("widevinecdm") { |
| 81 output_dir = "$root_out_dir/$widevine_cdm_path" |
| 80 sources = [ | 82 sources = [ |
| 81 "//media/cdm/stub/stub_cdm.cc", | 83 "//media/cdm/stub/stub_cdm.cc", |
| 82 "//media/cdm/stub/stub_cdm.h", | 84 "//media/cdm/stub/stub_cdm.h", |
| 83 ] | 85 ] |
| 84 | 86 |
| 85 defines = [ "CDM_IMPLEMENTATION" ] | 87 defines = [ "CDM_IMPLEMENTATION" ] |
| 86 | 88 |
| 87 deps = [ | 89 deps = [ |
| 88 ":version_h", | 90 ":version_h", |
| 89 "//base", | 91 "//base", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 117 template_file = chrome_version_rc_template | 119 template_file = chrome_version_rc_template |
| 118 sources = [ | 120 sources = [ |
| 119 "BRANDING", | 121 "BRANDING", |
| 120 "widevinecdmadapter.ver", | 122 "widevinecdmadapter.ver", |
| 121 ] | 123 ] |
| 122 output = "$target_gen_dir/widevinecdmadapter_version.rc" | 124 output = "$target_gen_dir/widevinecdmadapter_version.rc" |
| 123 } | 125 } |
| 124 | 126 |
| 125 ppapi_cdm_adapter("widevinecdmadapter") { | 127 ppapi_cdm_adapter("widevinecdmadapter") { |
| 126 defines = [] | 128 defines = [] |
| 129 output_dir = "$root_out_dir/$widevine_cdm_path" |
| 127 deps = [ | 130 deps = [ |
| 128 ":version_h", | 131 ":version_h", |
| 129 ":widevinecdm", | 132 ":widevinecdm", |
| 130 ":widevinecdmadapter_resources", | 133 ":widevinecdmadapter_resources", |
| 131 ] | 134 ] |
| 132 | 135 |
| 133 if (is_linux) { | 136 if (is_linux) { |
| 134 ldflags = | 137 ldflags = |
| 135 [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] | 138 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", |
| 139 root_build_dir) ] |
| 136 } else if (is_win) { | 140 } else if (is_win) { |
| 137 ldflags = | 141 ldflags = |
| 138 [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] | 142 [ rebase_path("$root_out_dir/$widevine_cdm_path/widevinecdm.dll.lib", |
| 143 root_build_dir) ] |
| 139 } else if (is_mac) { | 144 } else if (is_mac) { |
| 140 ldflags = | 145 ldflags = |
| 141 [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] | 146 [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.dylib", |
| 147 root_build_dir) ] |
| 142 } | 148 } |
| 143 } | 149 } |
| 144 } else { | 150 } else { |
| 145 # Placeholder when we're not compiling the adapter. | 151 # Placeholder when we're not compiling the adapter. |
| 146 group("widevinecdmadapter") { | 152 group("widevinecdmadapter") { |
| 147 } | 153 } |
| 148 } | 154 } |
| 149 | 155 |
| 150 # This target exists for tests to depend on that pulls in a runtime dependency | 156 # This target exists for tests to depend on that pulls in a runtime dependency |
| 151 # on the license server. | 157 # on the license server. |
| 152 source_set("widevine_test_license_server") { | 158 source_set("widevine_test_license_server") { |
| 153 if (is_chrome_branded && is_linux) { | 159 if (is_chrome_branded && is_linux) { |
| 154 deps = [ | 160 deps = [ |
| 155 # TODO(jrummell) | 161 # TODO(jrummell) |
| 156 # This target should be removed and targets should have data_deps on this
target: | 162 # This target should be removed and targets should have data_deps on this
target: |
| 157 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" | 163 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" |
| 158 ] | 164 ] |
| 159 } | 165 } |
| 160 } | 166 } |
| OLD | NEW |