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
04769c88
Commit
04769c88
authored
Jun 09, 2013
by
Jeremy Slater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec_consumers to targets for xcconfig file
parent
5af5828e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
24 deletions
+33
-24
xcconfig.rb
lib/cocoapods/generator/xcconfig.rb
+4
-7
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+8
-3
private_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
+6
-1
public_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
+4
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+0
-6
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+5
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+6
-6
No files found.
lib/cocoapods/generator/xcconfig.rb
View file @
04769c88
...
...
@@ -66,8 +66,8 @@ module Pod
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
end
#
Returns the Xcconfig generated from the build settings of the giv
e
#
specification consumer
.
#
Configures the given Xcconfig according to the build settings of th
e
#
given Specification
.
#
# @param [Specification::Consumer] consumer
# The consumer of the specification.
...
...
@@ -75,15 +75,12 @@ module Pod
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
# @return [Xcodeproj::Config]
#
def
consumer_xcconfig
(
consumer
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
consumer
.
xcconfig
)
def
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
merge!
(
consumer
.
xcconfig
)
xcconfig
.
libraries
.
merge
(
consumer
.
libraries
)
xcconfig
.
frameworks
.
merge
(
consumer
.
frameworks
)
xcconfig
.
weak_frameworks
.
merge
(
consumer
.
weak_frameworks
)
add_developers_frameworks_if_needed
(
consumer
,
xcconfig
)
xcconfig
end
# @return [Array<String>] The search paths for the developer frameworks.
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
04769c88
...
...
@@ -22,9 +22,14 @@ module Pod
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
}
target
.
pod_targets
.
each
do
|
lib
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
lib
.
xcconfig_prefix
+
k
target
.
pod_targets
.
each
do
|
pod_target
|
xcconfig
=
Xcodeproj
::
Config
.
new
pod_target
.
spec_consumers
.
each
do
|
consumer
|
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
end
xcconfig
.
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
pod_target
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
end
...
...
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
View file @
04769c88
...
...
@@ -22,7 +22,12 @@ module Pod
# 'USE_HEADERMAP' => 'NO'
}
consumer_xcconfig
(
target
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
xcconfig
=
Xcodeproj
::
Config
.
new
target
.
spec_consumers
.
each
do
|
consumer
|
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
end
xcconfig
.
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
target
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
...
...
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
View file @
04769c88
...
...
@@ -28,7 +28,10 @@ module Pod
# @return [Xcodeproj::Config]
#
def
generate
@xcconfig
=
consumer_xcconfig
(
target
.
consumer
)
@xcconfig
=
Xcodeproj
::
Config
.
new
target
.
spec_consumers
.
each
do
|
consumer
|
add_spec_build_settings_to_xcconfig
(
consumer
,
@xcconfig
)
end
@xcconfig
end
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
04769c88
...
...
@@ -97,12 +97,6 @@ module Pod
end
end
# @return [Specification::Consumer] the consumer for the specifications.
#
def
spec_consumers
@spec_consumers
||=
library
.
file_accessors
.
map
(
&
:spec_consumer
)
end
ENABLE_OBJECT_USE_OBJC_FROM
=
{
:ios
=>
Version
.
new
(
'6'
),
:osx
=>
Version
.
new
(
'10.8'
)
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
04769c88
...
...
@@ -56,6 +56,11 @@ module Pod
#
attr_accessor
:pod_targets
# @return [Array<SpecConsumer>]
def
spec_consumers
pod_targets
.
map
(
&
:specs
).
flatten
.
map
{
|
spec
|
spec
.
consumer
(
platform
)
}
end
# @return [Pathname] The absolute path of acknowledgements file.
#
# @note The acknowledgements generators add the extension according to
...
...
lib/cocoapods/target/pod_target.rb
View file @
04769c88
...
...
@@ -36,18 +36,18 @@ module Pod
#
attr_accessor
:file_accessors
# @return [
Specification::Consumer] the specification consumer for the
# target.
# @return [
Array<Specification::Consumer>] the specification consumers for
# t
he t
arget.
#
def
consumer
specs
.
first
.
root
.
consumer
(
platform
)
def
spec_consumers
specs
.
map
{
|
spec
|
spec
.
consumer
(
platform
)
}
end
# @return [Specification] the root specification for the target.
#
def
root_spec
specs
.
first
.
root
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