OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # Allow widevinecdmadapter to be built in Chromium. | 7 # Allow widevinecdmadapter to be built in Chromium. |
8 'variables': { | 8 'variables': { |
9 'enable_widevine%': 0, | 9 'enable_widevine%': 0, |
10 }, | 10 }, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 # If enable_widevine==1 then create a dummy widevinecdm. On Win/Mac | 53 # If enable_widevine==1 then create a dummy widevinecdm. On Win/Mac |
54 # the component updater will get the latest version and use it. | 54 # the component updater will get the latest version and use it. |
55 # Other systems are not currently supported. | 55 # Other systems are not currently supported. |
56 'widevine_cdm_version_h_file%': | 56 'widevine_cdm_version_h_file%': |
57 'stub/widevine_cdm_version.h', | 57 'stub/widevine_cdm_version.h', |
58 }], | 58 }], |
59 ], | 59 ], |
60 }, | 60 }, |
61 'includes': [ | 61 'includes': [ |
62 '../../../build/util/version.gypi', | 62 '../../../build/util/version.gypi', |
63 '../../../media/cdm_paths.gypi', | |
64 ], | 63 ], |
| 64 |
65 # Always provide a target, so we can put the logic about whether there's | 65 # Always provide a target, so we can put the logic about whether there's |
66 # anything to be done in this file (instead of a higher-level .gyp file). | 66 # anything to be done in this file (instead of a higher-level .gyp file). |
67 'targets': [ | 67 'targets': [ |
68 { | 68 { |
69 # GN version: //third_party/widevine/cdm:widevinecdmadapter_resources | 69 # GN version: //third_party/widevine/cdm:widevinecdmadapter_resources |
70 'target_name': 'widevinecdmadapter_resources', | 70 'target_name': 'widevinecdmadapter_resources', |
71 'type': 'none', | 71 'type': 'none', |
72 'variables': { | 72 'variables': { |
73 'output_dir': '.', | 73 'output_dir': '.', |
74 'branding_path': '../../../chrome/app/theme/<(branding_path_component)/B
RANDING', | 74 'branding_path': '../../../chrome/app/theme/<(branding_path_component)/B
RANDING', |
75 'template_input_path': '../../../chrome/app/chrome_version.rc.version', | 75 'template_input_path': '../../../chrome/app/chrome_version.rc.version', |
76 'extra_variable_files_arguments': [ '-f', 'BRANDING' ], | 76 'extra_variable_files_arguments': [ '-f', 'BRANDING' ], |
77 'extra_variable_files': [ 'BRANDING' ], # NOTE: matches that above | 77 'extra_variable_files': [ 'BRANDING' ], # NOTE: matches that above |
78 }, | 78 }, |
79 'sources': [ | 79 'sources': [ |
80 'widevinecdmadapter.ver', | 80 'widevinecdmadapter.ver', |
81 ], | 81 ], |
82 'includes': [ | 82 'includes': [ |
83 '../../../chrome/version_resource_rules.gypi', | 83 '../../../chrome/version_resource_rules.gypi', |
84 ], | 84 ], |
85 }, | 85 }, |
86 { | 86 { |
87 'target_name': 'widevinecdmadapter_binary', | 87 # GN version: //third_party/widevine/cdm:widevinecdmadapter |
88 'product_name': 'widevinecdmadapter', | 88 'target_name': 'widevinecdmadapter', |
89 'type': 'none', | 89 'type': 'none', |
90 'conditions': [ | 90 'conditions': [ |
91 [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms
== 1', { | 91 [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms
== 1', { |
92 'dependencies': [ | 92 'dependencies': [ |
93 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', | 93 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', |
94 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', | 94 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', |
95 'widevine_cdm_version_h', | 95 'widevine_cdm_version_h', |
96 'widevinecdm', | 96 'widevinecdm', |
97 'widevinecdmadapter_resources', | 97 'widevinecdmadapter_resources', |
98 ], | 98 ], |
99 'sources': [ | 99 'sources': [ |
100 '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc', | 100 '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc', |
101 ], | 101 ], |
102 'conditions': [ | 102 'conditions': [ |
103 [ 'os_posix == 1 and OS != "mac"', { | 103 [ 'os_posix == 1 and OS != "mac"', { |
104 'libraries': [ | 104 'libraries': [ |
105 '-lrt', | 105 '-lrt', |
106 # Copied/created by widevinecdm. | 106 # Copied/created by widevinecdm. |
107 '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.so', | 107 '<(PRODUCT_DIR)/libwidevinecdm.so', |
108 ], | 108 ], |
109 }], | 109 }], |
110 [ 'OS == "win"', { | 110 [ 'OS == "win"', { |
111 'libraries': [ | 111 'libraries': [ |
112 # Copied/created by widevinecdm. | 112 # Copied/created by widevinecdm. |
113 '<(PRODUCT_DIR)/<(widevine_cdm_path)/widevinecdm.dll.lib', | 113 '<(PRODUCT_DIR)/widevinecdm.dll.lib', |
114 ], | 114 ], |
115 }], | 115 }], |
116 [ 'OS == "mac"', { | 116 [ 'OS == "mac"', { |
117 'libraries': [ | 117 'libraries': [ |
118 # Copied/created by widevinecdm. | 118 # Copied/created by widevinecdm. |
119 '<(PRODUCT_DIR)/<(widevine_cdm_path)/libwidevinecdm.dylib', | 119 '<(PRODUCT_DIR)/libwidevinecdm.dylib', |
120 ], | 120 ], |
121 }, { | |
122 # Put Widevine CDM adapter to the correct path directly except | |
123 # for mac. On mac strip_save_dsym doesn't work with product_dir | |
124 # so we rely on "widevinecdmadapter" target to copy it over. | |
125 # See http://crbug.com/611990 | |
126 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
127 }], | 121 }], |
128 ], | 122 ], |
129 }], | 123 }], |
130 ], | 124 ], |
131 }, | 125 }, |
132 { | |
133 # GN version: //third_party/widevine/cdm:widevinecdmadapter | |
134 # On Mac this copies the widevinecdmadapter binary to | |
135 # <(widevine_cdm_path). On all other platforms the binary is already | |
136 # in <(widevine_cdm_path). See "product_dir" above. | |
137 'target_name': 'widevinecdmadapter', | |
138 'type': 'none', | |
139 'dependencies': [ | |
140 'widevinecdmadapter_binary', | |
141 ], | |
142 'conditions': [ | |
143 [ '(branding == "Chrome" or enable_widevine == 1) and enable_pepper_cdms
== 1 and OS == "mac"', { | |
144 'copies': [{ | |
145 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
146 'files': [ '<(PRODUCT_DIR)/widevinecdmadapter.plugin' ], | |
147 }], | |
148 }], | |
149 ], | |
150 }, | |
151 { | 126 { |
152 # GN version: //third_party/widevine/cdm:version_h | 127 # GN version: //third_party/widevine/cdm:version_h |
153 'target_name': 'widevine_cdm_version_h', | 128 'target_name': 'widevine_cdm_version_h', |
154 'type': 'none', | 129 'type': 'none', |
155 'copies': [{ | 130 'copies': [{ |
156 'destination': '<(SHARED_INTERMEDIATE_DIR)', | 131 'destination': '<(SHARED_INTERMEDIATE_DIR)', |
157 'files': [ '<(widevine_cdm_version_h_file)' ], | 132 'files': [ '<(widevine_cdm_version_h_file)' ], |
158 }], | 133 }], |
159 }, | 134 }, |
160 { | 135 { |
161 # GN version: //third_party/widevine/cdm:widevinecdm | 136 # GN version: //third_party/widevine/cdm:widevinecdm |
162 'target_name': 'widevinecdm', | 137 'target_name': 'widevinecdm', |
163 'type': 'none', | 138 'type': 'none', |
164 'conditions': [ | 139 'conditions': [ |
165 [ 'branding == "Chrome"', { | 140 [ 'branding == "Chrome"', { |
166 'conditions': [ | 141 'conditions': [ |
167 [ 'OS=="mac"', { | 142 [ 'OS=="mac"', { |
168 'xcode_settings': { | 143 'xcode_settings': { |
169 'COPY_PHASE_STRIP': 'NO', | 144 'COPY_PHASE_STRIP': 'NO', |
170 } | 145 } |
171 }], | 146 }], |
172 ], | 147 ], |
173 'copies': [{ | 148 'copies': [{ |
174 'destination': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | 149 # TODO(ddorwin): Do we need a sub-directory? We either need a |
| 150 # sub-directory or to rename manifest.json before we can copy it. |
| 151 'destination': '<(PRODUCT_DIR)', |
175 'files': [ '<@(widevine_cdm_binary_files)' ], | 152 'files': [ '<@(widevine_cdm_binary_files)' ], |
176 }], | 153 }], |
177 }], | 154 }], |
178 [ 'branding != "Chrome" and enable_widevine == 1', { | 155 [ 'branding != "Chrome" and enable_widevine == 1', { |
179 'product_dir': '<(PRODUCT_DIR)/<(widevine_cdm_path)', | |
180 'conditions': [ | 156 'conditions': [ |
181 ['os_posix == 1 and OS != "mac"', { | 157 ['os_posix == 1 and OS != "mac"', { |
182 'type': 'loadable_module', | 158 'type': 'loadable_module', |
183 # This causes the binary to be put in | 159 # Note that this causes the binary to be put in PRODUCT_DIR |
184 # <(PRODUCT_DIR)/<(widevine_cdm_path) instead of lib/. | 160 # instead of lib/. This matches what happens in the copy step |
185 # This matches what happens in the copy step above. | 161 # above. |
186 }], | 162 }], |
187 ['OS == "mac" or OS == "win"', { | 163 ['OS == "mac" or OS == "win"', { |
188 'type': 'shared_library', | 164 'type': 'shared_library', |
189 }], | 165 }], |
190 ['OS == "mac"', { | 166 ['OS == "mac"', { |
191 'xcode_settings': { | 167 'xcode_settings': { |
192 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | 168 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
193 }, | 169 }, |
194 }], | 170 }], |
195 ], | 171 ], |
(...skipping 16 matching lines...) Expand all Loading... |
212 'conditions': [ | 188 'conditions': [ |
213 [ 'branding == "Chrome" and OS == "linux"', { | 189 [ 'branding == "Chrome" and OS == "linux"', { |
214 'dependencies': [ | 190 'dependencies': [ |
215 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy
p:test_license_server', | 191 '<(DEPTH)/third_party/widevine/test/license_server/license_server.gy
p:test_license_server', |
216 ], | 192 ], |
217 }], | 193 }], |
218 ], | 194 ], |
219 }, | 195 }, |
220 ], | 196 ], |
221 } | 197 } |
OLD | NEW |