Commit 93869040 authored by Dieter Komendera's avatar Dieter Komendera

Use HEADER_SEARCH_PATHS instead of USER_HEADER_SEARCH_PATHS.

parent d9a1039b
...@@ -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
......
...@@ -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
......
...@@ -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
......
...@@ -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"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment