class MTBuild::FrameworkConfiguration

Use this class to create framework configurations. You won't typically instantiate this directly. Instead, the FrameworkProject.add_configuration method will create this for you.

Public Class Methods

new(parent_project, output_folder, configuration_name, configuration, api_headers) click to toggle source
Calls superclass method MTBuild::Configuration::new
# File lib/mtbuild/framework_configuration.rb, line 9
def initialize(parent_project, output_folder, configuration_name, configuration, api_headers)
  super parent_project, output_folder, configuration_name, configuration
  check_configuration(configuration)
  @api_headers = api_headers
  @configuration_headers = Utils.expand_folder_list(configuration.fetch(:configuration_headers, []), @project_folder)
  @object_files = Utils.expand_file_list(configuration[:objects], [], @project_folder)
end

Public Instance Methods

configure_tasks() click to toggle source

Create the actual Rake tasks that will perform the configuration's work

Calls superclass method MTBuild::Configuration#configure_tasks
# File lib/mtbuild/framework_configuration.rb, line 18
def configure_tasks
  super
  desc "Framework '#{@parent_project.project_name}' with configuration '#{@configuration_name}'"
  new_task = framework_task @configuration_name => @object_files do |t|
    puts "found framework #{t.name}."
  end
  new_task.api_headers = @api_headers
  new_task.configuration_headers = @configuration_headers
  new_task.library_files = @object_files
end

Private Instance Methods

check_configuration(configuration) click to toggle source
# File lib/mtbuild/framework_configuration.rb, line 31
def check_configuration(configuration)
  super
  fail "No objects specified for #{@parent_project.project_name}:#{@configuration_name}" if configuration.fetch(:objects, nil).nil?
end