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