Permalink
Browse files

Use HEADER_SEARCH_PATHS instead of USER_HEADER_SEARCH_PATHS.

  • Loading branch information...
1 parent ce53fea commit d3f85115ea41d71eeea0d9d629e5ebfd72b6f1ac @kommen committed Nov 23, 2011
@@ -27,8 +27,7 @@ def initialize(podfile, project, definition)
def xcconfig
@xcconfig ||= Xcodeproj::Config.new({
# In a workspace this is where the static library headers should be found.
- 'USER_HEADER_SEARCH_PATHS' => '"$(BUILT_PRODUCTS_DIR)/Pods"',
- 'ALWAYS_SEARCH_USER_PATHS' => 'YES',
+ 'HEADER_SEARCH_PATHS' => '"$(BUILT_PRODUCTS_DIR)/Pods"',
# This makes categories from static libraries work, which many libraries
# require, so we add these by default.
'OTHER_LDFLAGS' => '-ObjC -all_load',
@@ -79,7 +78,7 @@ def install!
# First add the target to the project
@target = @project.targets.new_static_library(@definition.lib_name)
- user_header_search_paths = []
+ header_search_paths = []
build_specifications.each do |spec|
xcconfig.merge!(spec.xcconfig)
# Only add implementation files to the compile phase
@@ -95,9 +94,9 @@ def install!
end
end
# Collect all header search paths
- user_header_search_paths.concat(spec.user_header_search_paths)
+ header_search_paths.concat(spec.header_search_paths)
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,
# move the compile build phase to the end, so that headers are copied
@@ -263,7 +263,7 @@ def copy_header_mappings
# 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
# methods.
- def user_header_search_paths
+ def header_search_paths
dirs = [header_dir] + copy_header_mappings.keys
dirs.map { |dir| %{"$(BUILT_PRODUCTS_DIR)/Pods/#{dir}"} }
end
@@ -10,7 +10,7 @@
end
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'
end
@@ -207,7 +207,7 @@ def @spec.copy_header_mapping(from)
def @spec.copy_header_mapping(from)
Pathname.new('ns') + from.basename
end
- @spec.user_header_search_paths.should == %w{
+ @spec.header_search_paths.should == %w{
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive"
"$(BUILT_PRODUCTS_DIR)/Pods/SSZipArchive/ns"
}
@@ -218,7 +218,7 @@ def @spec.copy_header_mapping(from)
def @spec.copy_header_mapping(from)
Pathname.new('ns') + from.basename
end
- @spec.user_header_search_paths.should == %w{
+ @spec.header_search_paths.should == %w{
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot"
"$(BUILT_PRODUCTS_DIR)/Pods/AnotherRoot/ns"
}

0 comments on commit d3f8511

Please sign in to comment.