~dlh/armagetronad/os-x-toolkit

« back to all changes in this revision

Viewing changes to os-x-toolkit.rb

  • Committer: Daniel Lee Harple
  • Date: 2013-10-29 21:57:20 UTC
  • Revision ID: leeharple@gmail.com-20131029215720-wdjnhw6ns9gzx8w7
Link framework headers into include/<framework_name> and each individual file into include/AllFrameworks

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
    file_path = self.path("libraries/Frameworks/#{framework_name}", :clear_file)
182
182
    FileUtils.cp_r(File.join(source, framework_name), file_path)
183
183
 
 
184
    # link lib file
184
185
    framework_lib_file = File.join(file_path, name)
185
186
    system("lipo", framework_lib_file, "-verify_arch", arch)
186
187
    if $?.exitstatus == 0
189
190
      puts "Error: '#{framework_name}' is not built for '#{arch}'."
190
191
      exit(1)
191
192
    end
 
193
 
 
194
    # link headers
 
195
    header_directory = File.join(file_path, "Headers")
 
196
    symlink_relative(header_directory, self.path("libraries/#{arch}/include/#{name}", :clear_file))
 
197
    Dir.glob("#{header_directory}/*") do |header_file|
 
198
      symlink_relative(header_file, self.path("libraries/#{arch}/include/AllFrameworks/#{File.basename(header_file)}", :clear_file))
 
199
    end
192
200
    return file_path
193
201
  end
194
202