@@ -163,7 +163,7 @@ def prebuild_frameworks!
163
163
Pod ::Prebuild . remove_build_dir ( sandbox_path )
164
164
165
165
166
- # copy vendored libraries and frameworks
166
+ # copy vendored libraries and frameworks as well as any license
167
167
targets . each do |target |
168
168
root_path = self . sandbox . pod_dir ( target . name )
169
169
target_folder = sandbox . framework_folder_path_for_target_name ( target . name )
@@ -178,14 +178,15 @@ def prebuild_frameworks!
178
178
179
179
target . spec_consumers . each do |consumer |
180
180
file_accessor = Sandbox ::FileAccessor . new ( root_path , consumer )
181
- lib_paths = file_accessor . vendored_frameworks || [ ]
182
- lib_paths += file_accessor . vendored_libraries
181
+ preserve_paths = file_accessor . vendored_frameworks || [ ]
182
+ preserve_paths += file_accessor . vendored_libraries
183
+ preserve_paths << file_accessor . license if file_accessor . license
183
184
# @TODO dSYM files
184
- lib_paths . each do |lib_path |
185
- relative = lib_path . relative_path_from ( root_path )
185
+ preserve_paths . each do |path |
186
+ relative = path . relative_path_from ( root_path )
186
187
destination = target_folder + relative
187
188
destination . dirname . mkpath unless destination . dirname . exist?
188
- FileUtils . cp_r ( lib_path , destination , :remove_destination => true )
189
+ FileUtils . cp_r ( path , destination , :remove_destination => true )
189
190
end
190
191
end
191
192
end
0 commit comments