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
...
@@ -66,8 +66,8 @@ module Pod
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
end
end
#
Returns the Xcconfig generated from the build settings of the giv
e
#
Configures the given Xcconfig according to the build settings of th
e
#
specification consumer
.
#
given Specification
.
#
#
# @param [Specification::Consumer] consumer
# @param [Specification::Consumer] consumer
# The consumer of the specification.
# The consumer of the specification.
...
@@ -75,15 +75,12 @@ module Pod
...
@@ -75,15 +75,12 @@ module Pod
# @param [Xcodeproj::Config] xcconfig
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
# The xcconfig to edit.
#
#
# @return [Xcodeproj::Config]
def
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
#
xcconfig
.
merge!
(
consumer
.
xcconfig
)
def
consumer_xcconfig
(
consumer
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
consumer
.
xcconfig
)
xcconfig
.
libraries
.
merge
(
consumer
.
libraries
)
xcconfig
.
libraries
.
merge
(
consumer
.
libraries
)
xcconfig
.
frameworks
.
merge
(
consumer
.
frameworks
)
xcconfig
.
frameworks
.
merge
(
consumer
.
frameworks
)
xcconfig
.
weak_frameworks
.
merge
(
consumer
.
weak_frameworks
)
xcconfig
.
weak_frameworks
.
merge
(
consumer
.
weak_frameworks
)
add_developers_frameworks_if_needed
(
consumer
,
xcconfig
)
add_developers_frameworks_if_needed
(
consumer
,
xcconfig
)
xcconfig
end
end
# @return [Array<String>] The search paths for the developer frameworks.
# @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
...
@@ -22,9 +22,14 @@ module Pod
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
}
}
target
.
pod_targets
.
each
do
|
lib
|
target
.
pod_targets
.
each
do
|
pod_target
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
xcconfig
=
Xcodeproj
::
Config
.
new
prefixed_key
=
lib
.
xcconfig_prefix
+
k
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
}
}"
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
end
end
end
...
...
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
View file @
04769c88
...
@@ -22,7 +22,12 @@ module Pod
...
@@ -22,7 +22,12 @@ module Pod
# 'USE_HEADERMAP' => 'NO'
# '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
prefixed_key
=
target
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
end
...
...
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
View file @
04769c88
...
@@ -28,7 +28,10 @@ module Pod
...
@@ -28,7 +28,10 @@ module Pod
# @return [Xcodeproj::Config]
# @return [Xcodeproj::Config]
#
#
def
generate
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
@xcconfig
end
end
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
04769c88
...
@@ -97,12 +97,6 @@ module Pod
...
@@ -97,12 +97,6 @@ module Pod
end
end
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
=
{
ENABLE_OBJECT_USE_OBJC_FROM
=
{
:ios
=>
Version
.
new
(
'6'
),
:ios
=>
Version
.
new
(
'6'
),
:osx
=>
Version
.
new
(
'10.8'
)
:osx
=>
Version
.
new
(
'10.8'
)
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
04769c88
...
@@ -56,6 +56,11 @@ module Pod
...
@@ -56,6 +56,11 @@ module Pod
#
#
attr_accessor
:pod_targets
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.
# @return [Pathname] The absolute path of acknowledgements file.
#
#
# @note The acknowledgements generators add the extension according to
# @note The acknowledgements generators add the extension according to
...
...
lib/cocoapods/target/pod_target.rb
View file @
04769c88
...
@@ -36,18 +36,18 @@ module Pod
...
@@ -36,18 +36,18 @@ module Pod
#
#
attr_accessor
:file_accessors
attr_accessor
:file_accessors
# @return [
Specification::Consumer] the specification consumer for the
# @return [
Array<Specification::Consumer>] the specification consumers for
# target.
# t
he t
arget.
#
#
def
consumer
def
spec_consumers
specs
.
first
.
root
.
consumer
(
platform
)
specs
.
map
{
|
spec
|
spec
.
consumer
(
platform
)
}
end
end
# @return [Specification] the root specification for the target.
#
def
root_spec
def
root_spec
specs
.
first
.
root
specs
.
first
.
root
end
end
#-------------------------------------------------------------------------#
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