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
93869040
Commit
93869040
authored
Nov 23, 2011
by
Dieter Komendera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use HEADER_SEARCH_PATHS instead of USER_HEADER_SEARCH_PATHS.
parent
d9a1039b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
installer.rb
lib/cocoapods/installer.rb
+4
-5
specification.rb
lib/cocoapods/specification.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+1
-1
specification_spec.rb
spec/unit/specification_spec.rb
+2
-2
No files found.
lib/cocoapods/installer.rb
View file @
93869040
...
@@ -29,8 +29,7 @@ module Pod
...
@@ -29,8 +29,7 @@ module Pod
def
xcconfig
def
xcconfig
@xcconfig
||=
Xcodeproj
::
Config
.
new
({
@xcconfig
||=
Xcodeproj
::
Config
.
new
({
# In a workspace this is where the static library headers should be found.
# In a workspace this is where the static library headers should be found.
'USER_HEADER_SEARCH_PATHS'
=>
'"$(BUILT_PRODUCTS_DIR)/Pods"'
,
'HEADER_SEARCH_PATHS'
=>
'"$(BUILT_PRODUCTS_DIR)/Pods"'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
# This makes categories from static libraries work, which many libraries
# This makes categories from static libraries work, which many libraries
# require, so we add these by default.
# require, so we add these by default.
'OTHER_LDFLAGS'
=>
'-ObjC -all_load'
,
'OTHER_LDFLAGS'
=>
'-ObjC -all_load'
,
...
@@ -81,7 +80,7 @@ module Pod
...
@@ -81,7 +80,7 @@ module Pod
# First add the target to the project
# First add the target to the project
@target
=
@project
.
targets
.
new_static_library
(
@definition
.
lib_name
)
@target
=
@project
.
targets
.
new_static_library
(
@definition
.
lib_name
)
user_
header_search_paths
=
[]
header_search_paths
=
[]
build_specifications
.
each
do
|
spec
|
build_specifications
.
each
do
|
spec
|
xcconfig
.
merge!
(
spec
.
xcconfig
)
xcconfig
.
merge!
(
spec
.
xcconfig
)
# Only add implementation files to the compile phase
# Only add implementation files to the compile phase
...
@@ -97,9 +96,9 @@ module Pod
...
@@ -97,9 +96,9 @@ module Pod
end
end
end
end
# Collect all header search paths
# Collect all header search paths
user_header_search_paths
.
concat
(
spec
.
user_
header_search_paths
)
header_search_paths
.
concat
(
spec
.
header_search_paths
)
end
end
xcconfig
.
merge!
(
'
USER_HEADER_SEARCH_PATHS'
=>
user_
header_search_paths
.
sort
.
uniq
.
join
(
" "
))
xcconfig
.
merge!
(
'
HEADER_SEARCH_PATHS'
=>
header_search_paths
.
sort
.
uniq
.
join
(
" "
))
# Now that we have added all the source files and copy header phases,
# Now that we have added all the source files and copy header phases,
# move the compile build phase to the end, so that headers are copied
# move the compile build phase to the end, so that headers are copied
...
...
lib/cocoapods/specification.rb
View file @
93869040
...
@@ -294,7 +294,7 @@ module Pod
...
@@ -294,7 +294,7 @@ module Pod
# includes the pod's header dir root and any other directories that might
# includes the pod's header dir root and any other directories that might
# have been added by overriding the copy_header_mapping/copy_header_mappings
# have been added by overriding the copy_header_mapping/copy_header_mappings
# methods.
# methods.
def
user_
header_search_paths
def
header_search_paths
dirs
=
[
header_dir
]
+
copy_header_mappings
.
keys
dirs
=
[
header_dir
]
+
copy_header_mappings
.
keys
dirs
.
map
{
|
dir
|
%{"$(BUILT_PRODUCTS_DIR)/Pods/#{dir}"}
}
dirs
.
map
{
|
dir
|
%{"$(BUILT_PRODUCTS_DIR)/Pods/#{dir}"}
}
end
end
...
...
spec/unit/installer_spec.rb
View file @
93869040
...
@@ -10,7 +10,7 @@ describe "Pod::Installer" do
...
@@ -10,7 +10,7 @@ describe "Pod::Installer" do
end
end
it
"sets the header search paths where installed Pod headers can be found"
do
it
"sets the header search paths where installed Pod headers can be found"
do
@xcconfig
[
'
USER_
HEADER_SEARCH_PATHS'
].
should
==
'"$(BUILT_PRODUCTS_DIR)/Pods"'
@xcconfig
[
'HEADER_SEARCH_PATHS'
].
should
==
'"$(BUILT_PRODUCTS_DIR)/Pods"'
@xcconfig
[
'ALWAYS_SEARCH_USER_PATHS'
].
should
==
'YES'
@xcconfig
[
'ALWAYS_SEARCH_USER_PATHS'
].
should
==
'YES'
end
end
...
...
spec/unit/specification_spec.rb
View file @
93869040
...
@@ -208,7 +208,7 @@ describe "A Pod::Specification, with installed source," do
...
@@ -208,7 +208,7 @@ describe "A Pod::Specification, with installed source," do
def
@spec
.
copy_header_mapping
(
from
)
def
@spec
.
copy_header_mapping
(
from
)
Pathname
.
new
(
'ns'
)
+
from
.
basename
Pathname
.
new
(
'ns'
)
+
from
.
basename
end
end
@spec
.
user_
header_search_paths
.
should
==
%w{
@spec
.
header_search_paths
.
should
==
%w{
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive"
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive"
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive/ns"
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive/ns"
}
}
...
@@ -219,7 +219,7 @@ describe "A Pod::Specification, with installed source," do
...
@@ -219,7 +219,7 @@ describe "A Pod::Specification, with installed source," do
def
@spec
.
copy_header_mapping
(
from
)
def
@spec
.
copy_header_mapping
(
from
)
Pathname
.
new
(
'ns'
)
+
from
.
basename
Pathname
.
new
(
'ns'
)
+
from
.
basename
end
end
@spec
.
user_
header_search_paths
.
should
==
%w{
@spec
.
header_search_paths
.
should
==
%w{
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot"
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot"
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot/ns"
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot/ns"
}
}
...
...
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