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
8e250f02
Commit
8e250f02
authored
Sep 04, 2017
by
Paul Beusterien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Propagate HEADER_SEARCH_PATHS settings from search paths
parent
021c1287
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
0 deletions
+45
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+3
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+26
-0
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+12
-0
No files found.
CHANGELOG.md
View file @
8e250f02
...
@@ -71,6 +71,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -71,6 +71,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Paul Beusterien
](
https://github.com/paulb777
)
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7002
](
https://github.com/CocoaPods/CocoaPods/pull/7002
)
[
#7002
](
https://github.com/CocoaPods/CocoaPods/pull/7002
)
*
Propagate HEADER_SEARCH_PATHS settings from search paths
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7006
](
https://github.com/CocoaPods/CocoaPods/pull/7006
)
## 1.3.1 (2017-08-02)
## 1.3.1 (2017-08-02)
##### Enhancements
##### Enhancements
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
8e250f02
...
@@ -176,6 +176,9 @@ module Pod
...
@@ -176,6 +176,9 @@ module Pod
generator
=
AggregateXCConfig
.
new
(
search_paths_target
,
configuration_name
)
generator
=
AggregateXCConfig
.
new
(
search_paths_target
,
configuration_name
)
@xcconfig
.
merge!
XCConfigHelper
.
search_paths_for_dependent_targets
(
nil
,
search_paths_target
.
pod_targets
)
@xcconfig
.
merge!
XCConfigHelper
.
search_paths_for_dependent_targets
(
nil
,
search_paths_target
.
pod_targets
)
@xcconfig
.
merge!
(
generator
.
settings_to_import_pod_targets
)
@xcconfig
.
merge!
(
generator
.
settings_to_import_pod_targets
)
# Propagate any HEADER_SEARCH_PATHS settings from the search paths.
XCConfigHelper
.
propagate_header_search_paths_from_search_paths
(
search_paths_target
,
@xcconfig
)
end
end
end
end
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
8e250f02
...
@@ -321,6 +321,32 @@ module Pod
...
@@ -321,6 +321,32 @@ module Pod
build_settings
build_settings
end
end
# Updates xcconfig with the HEADER_SEARCH_PATHS from the search_paths.
#
# @param [Target] search_paths_target
# The target.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
def
self
.
propagate_header_search_paths_from_search_paths
(
search_paths_target
,
xcconfig
)
header_search_paths_list
=
[]
search_paths_target
.
pod_targets
.
each
do
|
target
|
target
.
spec_consumers
.
each
do
|
spec_consumer
|
paths
=
spec_consumer
.
user_target_xcconfig
[
'HEADER_SEARCH_PATHS'
]
header_search_paths_list
<<=
paths
unless
paths
.
nil?
end
unless
header_search_paths_list
==
[]
header_search_paths
=
header_search_paths_list
.
join
(
' '
)
unless
header_search_paths
.
include?
'$(inherited)'
header_search_paths
=
'$(inherited) '
+
header_search_paths
end
build_settings
=
{
'HEADER_SEARCH_PATHS'
=>
header_search_paths
}
xcconfig
.
merge!
(
build_settings
)
end
end
end
# Add custom build settings and required build settings to link to
# Add custom build settings and required build settings to link to
# vendored libraries and frameworks.
# vendored libraries and frameworks.
#
#
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
8e250f02
...
@@ -161,6 +161,18 @@ module Pod
...
@@ -161,6 +161,18 @@ module Pod
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "Foo"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "Foo"'
end
end
it
'includes HEADER_SEARCH_PATHS from search paths'
do
xcconfig
=
Xcodeproj
::
Config
.
new
spec_consumer
=
stub
(
:user_target_xcconfig
=>
{
'HEADER_SEARCH_PATHS'
=>
'my/path'
})
pod_target
=
stub
(
:spec_consumers
=>
[
spec_consumer
])
search_path_target
=
stub
(
:pod_targets_for_build_configuration
=>
[
pod_target
],
:pod_targets
=>
[
pod_target
],
)
@sut
.
propagate_header_search_paths_from_search_paths
(
search_path_target
,
xcconfig
)
xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
'$(inherited) my/path'
end
it
'adds the frameworks of the xcconfig'
do
it
'adds the frameworks of the xcconfig'
do
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
consumer
=
stub
(
consumer
=
stub
(
...
...
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