Sha256: bf1c963632313d59abccfc6bb25f7b64e5186e2ce6da4f487cdaa076dddd995c

Contents?: true

Size: 742 Bytes

Versions: 19

Compression:

Stored size: 742 Bytes

Contents

module Xcake
  # This generator handles linking targets
  # specified as being linked in the Cakefile
  #
  class TargetLinkGenerator < Generator
    def self.dependencies
      [TargetGenerator]
    end

    def visit_target(target)
      return if target.linked_targets.empty?

      native_target = @context.native_object_for(target)
      frameworks_build_phase = native_target.frameworks_build_phase

      target.linked_targets.each do |linked_target|
        native_linked_target = @context.native_object_for(linked_target)
        target.target_dependencies << linked_target

        linked_product = native_linked_target.product_reference
        frameworks_build_phase.add_file_reference(linked_product)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
xcake-0.13.0 lib/xcake/generator/target_link_generator.rb
xcake-0.12.1 lib/xcake/generator/target_link_generator.rb
xcake-0.12.0 lib/xcake/generator/target_link_generator.rb
xcake-0.11.0 lib/xcake/generator/target_link_generator.rb
xcake-0.10.0 lib/xcake/generator/target_link_generator.rb
xcake-0.9.4 lib/xcake/generator/target_link_generator.rb
xcake-0.9.3 lib/xcake/generator/target_link_generator.rb
xcake-0.9.2 lib/xcake/generator/target_link_generator.rb
xcake-0.9.1 lib/xcake/generator/target_link_generator.rb
xcake-0.9.0 lib/xcake/generator/target_link_generator.rb
xcake-0.8.13 lib/xcake/generator/target_link_generator.rb
xcake-0.8.12 lib/xcake/generator/target_link_generator.rb
xcake-0.8.10 lib/xcake/generator/target_link_generator.rb
xcake-0.8.9 lib/xcake/generator/target_link_generator.rb
xcake-0.8.8 lib/xcake/generator/target_link_generator.rb
xcake-0.8.7 lib/xcake/generator/target_link_generator.rb
xcake-0.8.6 lib/xcake/generator/target_link_generator.rb
xcake-0.8.3 lib/xcake/generator/target_link_generator.rb
xcake-0.8.1 lib/xcake/generator/target_link_generator.rb