Commit 9787122b authored by Samuel E. Giddins's avatar Samuel E. Giddins Committed by Marius Rackwitz

[PodTargetInstaller] Allow installing a custom module map file

parent 8ed133c5
......@@ -15,7 +15,7 @@ gem 'json', '1.7.7'
group :development do
cp_gem 'claide', 'CLAide'
cp_gem 'cocoapods-core', 'Core'
cp_gem 'cocoapods-core', 'Core', 'seg-module-map'
cp_gem 'cocoapods-downloader', 'cocoapods-downloader'
cp_gem 'cocoapods-plugins', 'cocoapods-plugins'
cp_gem 'cocoapods-trunk', 'cocoapods-trunk'
......
......@@ -7,8 +7,8 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: ff06595f0151dd5d2ba247251f87bab63ece1cfb
branch: master
revision: 84675265bd37751d1e344275c56d19046624262d
branch: seg-module-map
specs:
cocoapods-core (0.36.3)
activesupport (>= 3.2.15)
......
......@@ -244,6 +244,20 @@ module Pod
group.new_file(path)
end
def create_module_map
return super unless module_map = target.file_accessors.first.module_map
path = target.module_map_path
UI.message "- Copying module map file to #{UI.path(path)}" do
FileUtils.cp(module_map, path)
add_file_to_support_group(path)
native_target.build_configurations.each do |c|
relative_path = path.relative_path_from(sandbox.root)
c.build_settings['MODULEMAP_FILE'] = relative_path.to_s
end
end
end
#-----------------------------------------------------------------------#
end
end
......
......@@ -212,6 +212,14 @@ module Pod
end
end
# @return [Pathname] The path of the custom module map file of the
# specification, if specified.
def module_map
if module_map = spec_consumer.spec.root.module_map
path_list.root + module_map
end
end
#-----------------------------------------------------------------------#
private
......
......@@ -402,6 +402,10 @@ module Pod
unless file_accessor.license || spec.license && (spec.license[:type] == 'Public Domain' || spec.license[:text])
warning('license', 'Unable to find a license file')
end
if spec.module_map && !file_accessor.module_map.exist?
error('module_map', "Unable to find the specified module map file.")
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment