@@ -156,7 +156,7 @@ def prebuild_frameworks!
156156            Pod ::Prebuild . remove_build_dir ( sandbox_path ) 
157157
158158
159-             # copy vendored libraries and frameworks 
159+             # copy vendored libraries and frameworks as well as any license  
160160            targets . each  do  |target |
161161                root_path  =  self . sandbox . pod_dir ( target . name ) 
162162                target_folder  =  sandbox . framework_folder_path_for_target_name ( target . name ) 
@@ -171,14 +171,15 @@ def prebuild_frameworks!
171171
172172                target . spec_consumers . each  do  |consumer |
173173                    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 
176177                    # @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 ) 
179180                        destination  =  target_folder  + relative 
180181                        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 ) 
182183                    end 
183184                end 
184185            end 
0 commit comments