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
419af929
Commit
419af929
authored
Sep 11, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add attributes to specification for frameworks and header_search_paths.
parent
44030731
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
specification.rb
lib/cocoa_pods/specification.rb
+17
-3
xcode_project.rb
lib/cocoa_pods/xcode_project.rb
+1
-0
No files found.
lib/cocoa_pods/specification.rb
View file @
419af929
...
...
@@ -86,6 +86,14 @@ module Pod
@xcconfig
=
path
end
def
frameworks
(
*
frameworks
)
@frameworks
=
frameworks
.
map
{
|
f
|
Pathname
.
new
(
f
)
}
end
def
header_search_paths
(
*
search_paths
)
@header_search_paths
=
search_paths
end
# Not attributes
# Returns the specification for the pod that this pod's source is a part of.
...
...
@@ -113,7 +121,7 @@ module Pod
def
create_static_library!
puts
"==> Creating static library"
source_files
=
[]
source_files
,
frameworks
,
header_search_paths
=
[],
[],
[]
resolved_dependent_specification_sets
.
each
do
|
set
|
# In case the set is only part of other pods we don't need to build
# the pod itself.
...
...
@@ -125,6 +133,12 @@ module Pod
pattern
=
pattern
+
'*.{h,m,mm,c,cpp}'
if
pattern
.
directory?
source_files
.
concat
(
Dir
.
glob
(
pattern
.
to_s
).
map
{
|
f
|
Pathname
.
new
(
f
)
})
end
if
f
=
spec
.
read
(
:frameworks
)
frameworks
.
concat
(
f
)
end
if
s
=
spec
.
read
(
:header_search_paths
)
header_search_paths
.
concat
(
s
)
end
end
project
=
XcodeProject
.
static_library
...
...
@@ -132,8 +146,8 @@ module Pod
file
=
file
.
relative_path_from
(
config
.
project_pods_root
)
project
.
add_source_file
(
file
)
end
project
.
add_framework
(
Pathname
.
new
(
'usr/lib/libxml2.2.7.3.dylib'
))
project
.
add_header_search_paths
(
%w{ $(SDKROOT)/usr/include/libxml2 }
)
frameworks
.
each
{
|
framework
|
project
.
add_framework
(
framework
)
}
project
.
add_header_search_paths
(
header_search_paths
)
project
.
create_in
(
config
.
project_pods_root
)
end
...
...
lib/cocoa_pods/xcode_project.rb
View file @
419af929
...
...
@@ -72,6 +72,7 @@ module Pod
def
add_header_search_paths
(
paths
)
objects_by_isa
(
'XCBuildConfiguration'
).
each
do
|
uuid
,
object
|
existing_paths
=
object
[
'buildSettings'
][
'HEADER_SEARCH_PATHS'
]
||=
[]
p
paths
existing_paths
.
concat
(
paths
)
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