Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
ce442f4a
Commit
ce442f4a
authored
Sep 26, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTargetInstaller] Preserve header_mappings_dir when copying headers to a framework
parent
4738e9c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
9 deletions
+34
-9
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+34
-9
No files found.
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
ce442f4a
...
...
@@ -83,15 +83,7 @@ module Pod
header_file_refs
=
headers
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
native_target
.
add_file_references
(
header_file_refs
)
do
|
build_file
|
# Set added headers as public if needed
build_file
.
settings
||=
{}
if
public_headers
.
include?
(
build_file
.
file_ref
.
real_path
)
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
'Public'
]
elsif
private_headers
.
include?
(
build_file
.
file_ref
.
real_path
)
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
'Private'
]
else
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
'Project'
]
end
add_header
(
build_file
,
public_headers
,
private_headers
)
end
other_file_refs
=
other_source_files
.
map
{
|
sf
|
project
.
reference_for_path
(
sf
)
}
...
...
@@ -285,6 +277,39 @@ module Pod
@custom_module_map
||=
target
.
file_accessors
.
first
.
module_map
end
def
header_mappings_dir
return
@header_mappings_dir
if
defined?
(
@header_mappings_dir
)
file_accessor
=
target
.
file_accessors
.
first
@header_mappings_dir
=
if
dir
=
file_accessor
.
spec_consumer
.
header_mappings_dir
file_accessor
.
path_list
.
root
+
dir
end
end
def
add_header
(
build_file
,
public_headers
,
private_headers
)
file_ref
=
build_file
.
file_ref
acl
=
if
public_headers
.
include?
(
file_ref
.
real_path
)
'Public'
elsif
private_headers
.
include?
(
file_ref
.
real_path
)
'Private'
else
'Project'
end
if
target
.
requires_frameworks?
&&
header_mappings_dir
relative_path
=
file_ref
.
real_path
.
relative_path_from
(
header_mappings_dir
)
sub_dir
=
relative_path
.
dirname
copy_phase_name
=
"Copy
#{
sub_dir
}
#{
acl
}
Headers"
copy_phase
=
native_target
.
copy_files_build_phases
.
find
{
|
bp
|
bp
.
name
==
copy_phase_name
}
||
native_target
.
new_copy_files_build_phase
(
copy_phase_name
)
copy_phase
.
symbol_dst_subfolder_spec
=
:products_directory
copy_phase
.
dst_path
=
"$(
#{
acl
.
upcase
}
_HEADERS_FOLDER_PATH)/
#{
sub_dir
}
"
copy_phase
.
add_file_reference
(
file_ref
,
true
)
else
build_file
.
settings
||=
{}
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
acl
]
end
end
#-----------------------------------------------------------------------#
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment