@@ -156,7 +156,7 @@ def prebuild_frameworks!
156
156
Pod ::Prebuild . remove_build_dir ( sandbox_path )
157
157
158
158
159
- # copy vendored libraries and frameworks
159
+ # copy vendored libraries and frameworks as well as any license
160
160
targets . each do |target |
161
161
root_path = self . sandbox . pod_dir ( target . name )
162
162
target_folder = sandbox . framework_folder_path_for_target_name ( target . name )
@@ -171,14 +171,15 @@ def prebuild_frameworks!
171
171
172
172
target . spec_consumers . each do |consumer |
173
173
file_accessor = Sandbox ::FileAccessor . new ( root_path , consumer )
174
- lib_paths = file_accessor . vendored_frameworks || [ ]
175
- lib_paths += file_accessor . vendored_libraries
174
+ preserve_paths = file_accessor . vendored_frameworks || [ ]
175
+ preserve_paths += file_accessor . vendored_libraries
176
+ preserve_paths << file_accessor . license if file_accessor . license
176
177
# @TODO dSYM files
177
- lib_paths . each do |lib_path |
178
- relative = lib_path . relative_path_from ( root_path )
178
+ preserve_paths . each do |path |
179
+ relative = path . relative_path_from ( root_path )
179
180
destination = target_folder + relative
180
181
destination . dirname . mkpath unless destination . dirname . exist?
181
- FileUtils . cp_r ( lib_path , destination , :remove_destination => true )
182
+ FileUtils . cp_r ( path , destination , :remove_destination => true )
182
183
end
183
184
end
184
185
end
0 commit comments