Class: MTBuild::FrameworkConfiguration

Inherits:
Configuration show all
Defined in:
lib/mtbuild/framework_configuration.rb

Overview

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.

Instance Attribute Summary

Attributes inherited from Configuration

#configuration_name, #output_folder, #parent_project, #project_folder

Instance Method Summary collapse

Methods included from Rake::DSL

#application_task, #framework_task, #static_library_task, #test_application_task

Constructor Details

#initialize(parent_project, output_folder, configuration_name, configuration, api_headers) ⇒ FrameworkConfiguration

Returns a new instance of FrameworkConfiguration.



9
10
11
12
13
14
15
# 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

Instance Method Details

#configure_tasksObject

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



18
19
20
21
22
23
24
25
26
27
# 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