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
Show 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
...
@@ -7,16 +7,16 @@ module Pod
#
#
class
XCConfig
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
attr_reader
:sandbox
# @param [Target]
aggregate_target @see aggregate_
target
# @param [Target]
target @see
target
#
#
def
initialize
(
aggregate_
target
)
def
initialize
(
target
)
@
aggregate_target
=
aggregate_
target
@
target
=
target
@sandbox
=
aggregate_
target
.
sandbox
@sandbox
=
target
.
sandbox
end
end
# @return [Xcodeproj::Config] The generated xcconfig.
# @return [Xcodeproj::Config] The generated xcconfig.
...
@@ -79,7 +79,7 @@ module Pod
...
@@ -79,7 +79,7 @@ module Pod
#
#
DEVELOPER_FRAMEWORKS_SEARCH_PATHS
=
[
DEVELOPER_FRAMEWORKS_SEARCH_PATHS
=
[
'$(inherited)'
,
'$(inherited)'
,
'"$(SDKROOT)/Developer/
aggregate_
target/Frameworks"'
,
'"$(SDKROOT)/Developer/target/Frameworks"'
,
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
]
]
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
a7607455
...
@@ -15,7 +15,7 @@ module Pod
...
@@ -15,7 +15,7 @@ module Pod
#
#
def
generate
def
generate
ld_flags
=
'-ObjC'
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'
ld_flags
<<
' -fobjc-arc'
end
end
...
@@ -23,11 +23,11 @@ module Pod
...
@@ -23,11 +23,11 @@ module Pod
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'HEADER_SEARCH_PATHS'
=>
quote
(
sandbox
.
public_headers
.
search_paths
),
'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'
,
'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
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
lib
.
xcconfig_prefix
+
k
prefixed_key
=
lib
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
...
@@ -35,7 +35,7 @@ module Pod
...
@@ -35,7 +35,7 @@ module Pod
end
end
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
.
includes
=
aggregate_
target
.
pod_targets
.
map
(
&
:name
)
@xcconfig
.
includes
=
target
.
pod_targets
.
map
(
&
:name
)
@xcconfig
@xcconfig
end
end
...
...
lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
View file @
a7607455
...
@@ -4,7 +4,7 @@ module Pod
...
@@ -4,7 +4,7 @@ module Pod
#
#
class
PrivatePodXCConfig
<
XCConfig
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
# @note The private xcconfig file for a spec target includes the public
# namespaced xcconfig file and merges the configuration values
# namespaced xcconfig file and merges the configuration values
...
@@ -14,7 +14,7 @@ module Pod
...
@@ -14,7 +14,7 @@ module Pod
#
#
def
generate
def
generate
ld_flags
=
'-ObjC'
ld_flags
=
'-ObjC'
if
aggregate_
target
.
consumer
.
requires_arc?
if
target
.
consumer
.
requires_arc?
ld_flags
<<
' -fobjc-arc'
ld_flags
<<
' -fobjc-arc'
end
end
...
@@ -22,18 +22,18 @@ module Pod
...
@@ -22,18 +22,18 @@ module Pod
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'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'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'COCOAPODS=1'
,
# 'USE_HEADERMAP' => 'NO'
# 'USE_HEADERMAP' => 'NO'
}
}
consumer_xcconfig
(
aggregate_
target
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
consumer_xcconfig
(
target
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
prefixed_key
=
aggregate_
target
.
xcconfig_prefix
+
k
prefixed_key
=
target
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
end
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
.
includes
=
[
aggregate_
target
.
name
]
@xcconfig
.
includes
=
[
target
.
name
]
@xcconfig
@xcconfig
end
end
...
...
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
View file @
a7607455
...
@@ -16,10 +16,10 @@ module Pod
...
@@ -16,10 +16,10 @@ module Pod
# @return [void]
# @return [void]
#
#
def
save_as
(
path
)
def
save_as
(
path
)
generate
.
save_as
(
path
,
aggregate_
target
.
xcconfig_prefix
)
generate
.
save_as
(
path
,
target
.
xcconfig_prefix
)
end
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
# @note The xcconfig file for a public spec target includes the
# standard podspec defined values including libraries,
# standard podspec defined values including libraries,
...
@@ -28,7 +28,7 @@ module Pod
...
@@ -28,7 +28,7 @@ module Pod
# @return [Xcodeproj::Config]
# @return [Xcodeproj::Config]
#
#
def
generate
def
generate
@xcconfig
=
consumer_xcconfig
(
aggregate_
target
.
consumer
)
@xcconfig
=
consumer_xcconfig
(
target
.
consumer
)
@xcconfig
@xcconfig
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