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
461a1289
Commit
461a1289
authored
May 09, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Xcconfing] Disable headers map && minor clean up
parent
daa67520
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
24 deletions
+20
-24
xcconfig.rb
lib/cocoapods/generator/xcconfig.rb
+20
-24
No files found.
lib/cocoapods/generator/xcconfig.rb
View file @
461a1289
module
Pod
module
Pod
module
Generator
module
Generator
# Generates an xcconfig file for each target of the Pods project. The
# Generates Xcode configuration files. A configuration file is generated
# configuration file should be used by the user target as well.
# for each Pod and for each Pod target definition. The aggregates the
# configurations of the Pods and define target specific settings.
#
#
class
XCConfig
class
XCConfig
...
@@ -44,10 +45,14 @@ module Pod
...
@@ -44,10 +45,14 @@ module Pod
# Generates the xcconfig for the library.
# Generates the xcconfig for the library.
#
#
# @return [Xcodeproj::Config]
# @note The xcconfig file for a spec derived target includes namespaced
# configuration values, the private build headers and headermap
# disabled. The xcconfig file for the Pods integration target
# then includes the spec xcconfig and incorporates the namespaced
# configuration values like preprocessor overrides or frameworks
# to link with.
#
#
# @note The value `PODS_HEADERS_SEARCH_PATHS` is used to store the headers
# @return [Xcodeproj::Config]
# so xcconfig can reference the variable.
#
#
def
generate
def
generate
ld_flags
=
'-ObjC'
ld_flags
=
'-ObjC'
...
@@ -55,29 +60,20 @@ module Pod
...
@@ -55,29 +60,20 @@ module Pod
ld_flags
<<
' -fobjc-arc'
ld_flags
<<
' -fobjc-arc'
end
end
# The xcconfig file for a spec derived target includes namespaced
# configuration values, the private build headers and headermap
# disabled.
# The xcconfig file for the Pods integration target then includes the
# spec xcconfig and incorporates the namespaced configuration values
# like preprocessor overrides or frameworks to link with.
if
library
.
spec
if
library
.
spec
prefix
=
library
.
xcconfig_prefix
config
=
{
config
=
{
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'OTHER_LDFLAGS'
=>
ld_flags
,
'HEADER_SEARCH_PATHS'
=>
'${PODS_HEADERS_SEARCH_PATHS}'
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'PODS_HEADERS_SEARCH_PATHS'
=>
'${PODS_BUILD_HEADERS_SEARCH_PATHS} ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}'
,
'HEADER_SEARCH_PATHS'
=>
quote
(
library
.
build_headers
.
search_paths
)
+
' '
+
quote
(
sandbox
.
public_headers
.
search_paths
),
'PODS_BUILD_HEADERS_SEARCH_PATHS'
=>
quote
(
library
.
build_headers
.
search_paths
),
'PODS_PUBLIC_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
(
library
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
consumer_xcconfig
(
library
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
library
.
xcconfig_prefix
}#{
k
}
}"
prefixed_key
=
library
.
xcconfig_prefix
+
k
config
[
"
#{
library
.
xcconfig_prefix
}#{
k
}
"
]
=
v
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
config
[
prefixed_key
]
=
v
end
end
else
else
config
=
{
config
=
{
...
@@ -89,12 +85,12 @@ module Pod
...
@@ -89,12 +85,12 @@ module Pod
'PODS_BUILD_HEADERS_SEARCH_PATHS'
=>
''
,
'PODS_BUILD_HEADERS_SEARCH_PATHS'
=>
''
,
'PODS_PUBLIC_HEADERS_SEARCH_PATHS'
=>
quote
(
sandbox
.
public_headers
.
search_paths
),
'PODS_PUBLIC_HEADERS_SEARCH_PATHS'
=>
quote
(
sandbox
.
public_headers
.
search_paths
),
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'USE_HEADERMAP'
=>
'$(inherited)'
}
}
library
.
libraries
.
each
do
|
lib
|
library
.
libraries
.
each
do
|
lib
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
consumer_xcconfig
(
lib
.
consumer
).
to_hash
.
each
do
|
k
,
v
|
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
lib
.
xcconfig_prefix
}#{
k
}
}"
prefixed_key
=
lib
.
xcconfig_prefix
+
k
config
[
k
]
=
"
#{
config
[
k
]
}
${
#{
prefixed_key
}
}"
end
end
end
end
end
end
...
@@ -151,8 +147,8 @@ module Pod
...
@@ -151,8 +147,8 @@ module Pod
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
end
end
#
Configures the given Xcconfig according to the build settings of th
e
#
Returns the Xcconfig generated from the build settings of the giv
e
#
given Specification
.
#
specification consumer
.
#
#
# @param [Specification::Consumer] consumer
# @param [Specification::Consumer] consumer
# The consumer of the specification.
# The consumer of the specification.
...
@@ -160,7 +156,7 @@ module Pod
...
@@ -160,7 +156,7 @@ module Pod
# @param [Xcodeproj::Config] xcconfig
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
# The xcconfig to edit.
#
#
# @return [
void
]
# @return [
Xcodeproj::Config
]
#
#
def
consumer_xcconfig
(
consumer
)
def
consumer_xcconfig
(
consumer
)
xcconfig
=
Xcodeproj
::
Config
.
new
()
xcconfig
=
Xcodeproj
::
Config
.
new
()
...
...
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