Commit 462be233 authored by Marius Rackwitz's avatar Marius Rackwitz

Merge pull request #4509 from timbodeit/framework-nested-headers

Use correct path for import in umbrella header when preserving header_mappings_dir
parents b624a499 4664c22c
......@@ -26,9 +26,15 @@ module Pod
generator.private_headers += target.file_accessors.flat_map(&:private_headers).map(&:basename)
end
create_umbrella_header do |generator|
if header_mappings_dir
generator.imports += target.file_accessors.flat_map(&:public_headers).map do |pathname|
pathname.relative_path_from(header_mappings_dir)
end
else
generator.imports += target.file_accessors.flat_map(&:public_headers).map(&:basename)
end
end
end
create_prefix_header
create_dummy_source
end
......
......@@ -249,7 +249,8 @@ module Pod
#--------------------------------------------------------------------------------#
it 'creates custom copy files phases for framework pods with header_mappings_dirs' do
describe 'concerning header_mappings_dirs' do
before do
@project.add_pod_group('snake', fixture('snake'))
@pod_target = fixture_pod_target('snake/snake.podspec', @target_definition)
......@@ -261,7 +262,9 @@ module Pod
end
@installer.stubs(:target).returns(@pod_target)
@installer.install!
end
it 'creates custom copy files phases for framework pods' do
target = @project.native_targets.first
target.name.should == 'snake'
......@@ -292,6 +295,21 @@ module Pod
]
end
it 'uses relative file paths to generate umbrella header' do
content = @pod_target.umbrella_header_path.read
content.should =~ %r{"A/Boa.h"}
content.should =~ %r{"A/Garden.h"}
content.should =~ %r{"A/Rattle.h"}
content.should =~ %r{"B/Boa.h"}
content.should =~ %r{"B/Garden.h"}
content.should =~ %r{"B/Rattle.h"}
content.should =~ %r{"C/Boa.h"}
content.should =~ %r{"C/Garden.h"}
content.should =~ %r{"C/Rattle.h"}
end
end
#--------------------------------------------------------------------------------#
describe 'concerning compiler flags' do
......
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