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
a7607455
Commit
a7607455
authored
Jun 03, 2013
by
Jeremy Slater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCConfig is generated for Pod targets as well
parent
e8d61f35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
xcconfig.rb
lib/cocoapods/generator/xcconfig.rb
+7
-7
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+4
-4
private_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
+6
-6
public_pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
+3
-3
No files found.
lib/cocoapods/generator/xcconfig.rb
View file @
a7607455
...
...
@@ -7,16 +7,16 @@ module Pod
#
class
XCConfig
# @return [Target] the
aggregate_target or
target represented by this xcconfig.
# @return [Target] the target represented by this xcconfig.
#
attr_reader
:
aggregate_
target
attr_reader
:target
attr_reader
:sandbox
# @param [Target]
aggregate_target @see aggregate_
target
# @param [Target]
target @see
target
#
def
initialize
(
aggregate_
target
)
@
aggregate_target
=
aggregate_
target
@sandbox
=
aggregate_
target
.
sandbox
def
initialize
(
target
)
@
target
=
target
@sandbox
=
target
.
sandbox
end
# @return [Xcodeproj::Config] The generated xcconfig.
...
...
@@ -79,7 +79,7 @@ module Pod
#
DEVELOPER_FRAMEWORKS_SEARCH_PATHS
=
[
'$(inherited)'
,
'"$(SDKROOT)/Developer/
aggregate_
target/Frameworks"'
,
'"$(SDKROOT)/Developer/target/Frameworks"'
,
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
]
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
a7607455
...
...
@@ -15,7 +15,7 @@ module Pod
#
def
generate
ld_flags
=
'-ObjC'
if
aggregate_
target
.
target_definition
.
podfile
.
set_arc_compatibility_flag?
if
target
.
target_definition
.
podfile
.
set_arc_compatibility_flag?
ld_flags
<<
' -fobjc-arc'
end
...
...
@@ -23,11 +23,11 @@ module Pod
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'HEADER_SEARCH_PATHS'
=>
quote
(
sandbox
.
public_headers
.
search_paths
),
'PODS_ROOT'
=>
aggregate_
target
.
relative_pods_root
,
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
}
aggregate_
target
.
pod_targets
.
each
do
|
lib
|
target
.
pod_targets
.
each
do
|
lib
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
lib
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
...
...
@@ -35,7 +35,7 @@ module Pod
end
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
.
includes
=
aggregate_
target
.
pod_targets
.
map
(
&
:name
)
@xcconfig
.
includes
=
target
.
pod_targets
.
map
(
&
:name
)
@xcconfig
end
...
...
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
View file @
a7607455
...
...
@@ -4,7 +4,7 @@ module Pod
#
class
PrivatePodXCConfig
<
XCConfig
# Generates the xcconfig for the
aggregate_
target.
# Generates the xcconfig for the target.
#
# @note The private xcconfig file for a spec target includes the public
# namespaced xcconfig file and merges the configuration values
...
...
@@ -14,7 +14,7 @@ module Pod
#
def
generate
ld_flags
=
'-ObjC'
if
aggregate_
target
.
consumer
.
requires_arc?
if
target
.
consumer
.
requires_arc?
ld_flags
<<
' -fobjc-arc'
end
...
...
@@ -22,18 +22,18 @@ module Pod
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'HEADER_SEARCH_PATHS'
=>
quote
(
aggregate_
target
.
build_headers
.
search_paths
)
+
' '
+
quote
(
sandbox
.
public_headers
.
search_paths
),
'HEADER_SEARCH_PATHS'
=>
quote
(
target
.
build_headers
.
search_paths
)
+
' '
+
quote
(
sandbox
.
public_headers
.
search_paths
),
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
,
# 'USE_HEADERMAP' => 'NO'
}
consumer_xcconfig
(
aggregate_
target
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
aggregate_
target
.
xcconfig_prefix
+
k
consumer_xcconfig
(
target
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
target
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
.
includes
=
[
aggregate_
target
.
name
]
@xcconfig
.
includes
=
[
target
.
name
]
@xcconfig
end
...
...
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
View file @
a7607455
...
...
@@ -16,10 +16,10 @@ module Pod
# @return [void]
#
def
save_as
(
path
)
generate
.
save_as
(
path
,
aggregate_
target
.
xcconfig_prefix
)
generate
.
save_as
(
path
,
target
.
xcconfig_prefix
)
end
# Generates the xcconfig for the
aggregate_
target.
# Generates the xcconfig for the target.
#
# @note The xcconfig file for a public spec target includes the
# standard podspec defined values including libraries,
...
...
@@ -28,7 +28,7 @@ module Pod
# @return [Xcodeproj::Config]
#
def
generate
@xcconfig
=
consumer_xcconfig
(
aggregate_
target
.
consumer
)
@xcconfig
=
consumer_xcconfig
(
target
.
consumer
)
@xcconfig
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