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
f672cc9d
Commit
f672cc9d
authored
Feb 18, 2016
by
Samuel Giddins
Committed by
Marius Rackwitz
Feb 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XCConfig] Fix search path inheritance support
parent
07acbf3c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+2
-1
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+6
-4
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+4
-7
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
f672cc9d
...
@@ -70,7 +70,6 @@ module Pod
...
@@ -70,7 +70,6 @@ module Pod
generate_settings_to_import_pod_targets
generate_settings_to_import_pod_targets
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_settings_for_dependent_targets
(
target
,
pod_targets
,
@xcconfig
)
generate_vendored_build_settings
generate_vendored_build_settings
generate_other_ld_flags
generate_other_ld_flags
...
@@ -131,9 +130,11 @@ module Pod
...
@@ -131,9 +130,11 @@ module Pod
# - `@import …;` / `import …`
# - `@import …;` / `import …`
#
#
def
generate_settings_to_import_pod_targets
def
generate_settings_to_import_pod_targets
@xcconfig
.
merge!
XCConfigHelper
.
settings_for_dependent_targets
(
target
,
pod_targets
)
@xcconfig
.
merge!
(
settings_to_import_pod_targets
)
@xcconfig
.
merge!
(
settings_to_import_pod_targets
)
target
.
search_paths_aggregate_targets
.
each
do
|
search_paths_target
|
target
.
search_paths_aggregate_targets
.
each
do
|
search_paths_target
|
generator
=
AggregateXCConfig
.
new
(
search_paths_target
,
configuration_name
)
generator
=
AggregateXCConfig
.
new
(
search_paths_target
,
configuration_name
)
@xcconfig
.
merge!
XCConfigHelper
.
settings_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
)
end
end
end
end
...
...
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
f672cc9d
...
@@ -45,12 +45,14 @@ module Pod
...
@@ -45,12 +45,14 @@ module Pod
search_paths
=
target_search_paths
.
concat
(
sandbox_search_paths
).
uniq
search_paths
=
target_search_paths
.
concat
(
sandbox_search_paths
).
uniq
config
=
{
config
=
{
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
search_paths
),
'LIBRARY_SEARCH_PATHS'
=>
'$(inherited) '
,
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
),
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
),
'PODS_ROOT'
=>
'${SRCROOT}'
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
search_paths
),
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'SKIP_INSTALL'
=>
'YES'
,
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
'SKIP_INSTALL'
=>
'YES'
,
# 'USE_HEADERMAP' => 'NO'
# 'USE_HEADERMAP' => 'NO'
}
}
...
@@ -61,7 +63,7 @@ module Pod
...
@@ -61,7 +63,7 @@ module Pod
@xcconfig
.
merge!
(
file_accessor
.
spec_consumer
.
pod_target_xcconfig
)
@xcconfig
.
merge!
(
file_accessor
.
spec_consumer
.
pod_target_xcconfig
)
end
end
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_settings_for_dependent_targets
(
target
,
target
.
dependent_targets
,
@xcconfig
)
@xcconfig
.
merge!
XCConfigHelper
.
settings_for_dependent_targets
(
target
,
target
.
dependent_targets
)
@xcconfig
@xcconfig
end
end
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
f672cc9d
...
@@ -219,7 +219,7 @@ module Pod
...
@@ -219,7 +219,7 @@ module Pod
add_language_specific_settings
(
target
,
xcconfig
)
add_language_specific_settings
(
target
,
xcconfig
)
end
end
#
Add
the search paths for frameworks and libraries the given target
#
Returns
the search paths for frameworks and libraries the given target
# depends on, so that it can be correctly built and linked.
# depends on, so that it can be correctly built and linked.
#
#
# @param [Target] target
# @param [Target] target
...
@@ -228,12 +228,9 @@ module Pod
...
@@ -228,12 +228,9 @@ module Pod
# @param [Array<PodTarget>] dependent_targets
# @param [Array<PodTarget>] dependent_targets
# The pod targets the given target depends on.
# The pod targets the given target depends on.
#
#
# @param [Xcodeproj::Config] xcconfig
# @return [Hash<String, String>] the settings
# The xcconfig to edit.
#
#
# @return [void]
def
self
.
settings_for_dependent_targets
(
target
,
dependent_targets
)
#
def
self
.
add_settings_for_dependent_targets
(
target
,
dependent_targets
,
xcconfig
)
dependent_targets
=
dependent_targets
.
select
(
&
:should_build?
)
dependent_targets
=
dependent_targets
.
select
(
&
:should_build?
)
has_configuration_build_dir
=
target
.
respond_to?
(
:configuration_build_dir
)
has_configuration_build_dir
=
target
.
respond_to?
(
:configuration_build_dir
)
if
has_configuration_build_dir
if
has_configuration_build_dir
...
@@ -259,7 +256,7 @@ module Pod
...
@@ -259,7 +256,7 @@ module Pod
build_settings
[
'FRAMEWORK_SEARCH_PATHS'
]
=
'$(inherited) '
+
XCConfigHelper
.
quote
(
framework_search_paths
.
uniq
)
build_settings
[
'FRAMEWORK_SEARCH_PATHS'
]
=
'$(inherited) '
+
XCConfigHelper
.
quote
(
framework_search_paths
.
uniq
)
build_settings
[
'LIBRARY_SEARCH_PATHS'
]
=
'$(inherited) '
+
XCConfigHelper
.
quote
(
library_search_paths
.
uniq
)
build_settings
[
'LIBRARY_SEARCH_PATHS'
]
=
'$(inherited) '
+
XCConfigHelper
.
quote
(
library_search_paths
.
uniq
)
end
end
xcconfig
.
merge!
(
build_settings
)
build_settings
end
end
# Checks if the given target requires language specific settings and
# Checks if the given target requires language specific settings and
...
...
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