Class: Xcake::LinkLibraryFileReferenceInstaller

Inherits:
FileReferenceInstaller show all
Defined in:
lib/xcake/file_reference_installer/link_library_file_reference_installer.rb

Overview

This build phase generator detects library files and adds them to the frameworks build phase.

Instance Attribute Summary

Attributes inherited from FileReferenceInstaller

#context

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FileReferenceInstaller

#initialize, plugins_location

Methods included from Visitor

#item_name, #leave, #visit

Methods included from Plugin

included

Methods included from Dependency

included

Constructor Details

This class inherits a constructor from Xcake::FileReferenceInstaller

Class Method Details

.can_install_node(node) ⇒ Object



6
7
8
# File 'lib/xcake/file_reference_installer/link_library_file_reference_installer.rb', line 6

def self.can_install_node(node)
  %w(.a .dylib .so .framework).include?(File.extname(node.path))
end

Instance Method Details

#add_file_reference_to_target(file_reference, target) ⇒ Object



10
11
12
# File 'lib/xcake/file_reference_installer/link_library_file_reference_installer.rb', line 10

def add_file_reference_to_target(file_reference, target)
  target.frameworks_build_phases.add_file_reference(file_reference, true)
end

#visit_node(node) ⇒ Object



14
15
16
17
18
19
# File 'lib/xcake/file_reference_installer/link_library_file_reference_installer.rb', line 14

def visit_node(node)
  super

  # Ignore all files inside of libraries
  node.children = []
end