Sha256: 6a330d43318e82921ad79154d3fc0bb228ca11f557f849169bec0af11151c149

Contents?: true

Size: 1.47 KB

Versions: 18

Compression:

Stored size: 1.47 KB

Contents

require 'xcodeproj'

module Xcake
  # This generator processes the configurations
  # and creates xcode build configurations.
  #
  class ConfigurationGenerator < Generator
    def self.dependencies
      [TargetGenerator, DefaultProjectStructureGenerator]
    end

    def visit_project(project)
      create_build_configurations_for(project)
    end

    def visit_target(target)
      create_build_configurations_for(target)
    end

    def create_build_configurations_for(configuration_object)
      EventHooks.run_hook :before_creating_build_configurations, configuration_object

      configuration_object.all_configurations.each do |configuration|
        EventHooks.run_hook :before_creating_build_configuration, configuration, configuration_object

        build_configuration = @context.native_object_for(configuration)
        build_configuration.name = configuration.name
        build_configuration.build_settings = configuration.settings

        unless configuration.configuration_file.nil?
          EventHooks.run_hook :before_attaching_xcconfig, configuration
          configuration_file = configuration.configuration_file
          file_reference = @context.file_reference_for_path(configuration_file)
        end

        build_configuration.base_configuration_reference = file_reference

        native_configuration_object = @context.native_object_for(configuration_object)
        native_configuration_object.build_configurations << build_configuration
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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