@@ -163,7 +163,7 @@ def prebuild_frameworks!
163163 Pod ::Prebuild . remove_build_dir ( sandbox_path )
164164
165165
166- # copy vendored libraries and frameworks
166+ # copy vendored libraries and frameworks as well as any license
167167 targets . each do |target |
168168 root_path = self . sandbox . pod_dir ( target . name )
169169 target_folder = sandbox . framework_folder_path_for_target_name ( target . name )
@@ -178,14 +178,15 @@ def prebuild_frameworks!
178178
179179 target . spec_consumers . each do |consumer |
180180 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
183184 # @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 )
186187 destination = target_folder + relative
187188 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 )
189190 end
190191 end
191192 end
0 commit comments