Commit f672cc9d authored by Samuel Giddins's avatar Samuel Giddins Committed by Marius Rackwitz

[XCConfig] Fix search path inheritance support

parent 07acbf3c
...@@ -70,7 +70,6 @@ module Pod ...@@ -70,7 +70,6 @@ module Pod
generate_settings_to_import_pod_targets generate_settings_to_import_pod_targets
XCConfigHelper.add_target_specific_settings(target, @xcconfig) XCConfigHelper.add_target_specific_settings(target, @xcconfig)
XCConfigHelper.add_settings_for_dependent_targets(target, pod_targets, @xcconfig)
generate_vendored_build_settings generate_vendored_build_settings
generate_other_ld_flags generate_other_ld_flags
...@@ -131,9 +130,11 @@ module Pod ...@@ -131,9 +130,11 @@ module Pod
# - `@import …;` / `import …` # - `@import …;` / `import …`
# #
def generate_settings_to_import_pod_targets def generate_settings_to_import_pod_targets
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, pod_targets)
@xcconfig.merge!(settings_to_import_pod_targets) @xcconfig.merge!(settings_to_import_pod_targets)
target.search_paths_aggregate_targets.each do |search_paths_target| target.search_paths_aggregate_targets.each do |search_paths_target|
generator = AggregateXCConfig.new(search_paths_target, configuration_name) generator = AggregateXCConfig.new(search_paths_target, configuration_name)
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(nil, search_paths_target.pod_targets)
@xcconfig.merge!(generator.settings_to_import_pod_targets) @xcconfig.merge!(generator.settings_to_import_pod_targets)
end end
end end
......
...@@ -45,12 +45,14 @@ module Pod ...@@ -45,12 +45,14 @@ module Pod
search_paths = target_search_paths.concat(sandbox_search_paths).uniq search_paths = target_search_paths.concat(sandbox_search_paths).uniq
config = { config = {
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) ',
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_paths),
'LIBRARY_SEARCH_PATHS' => '$(inherited) ',
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target), 'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'PODS_ROOT' => '${SRCROOT}', 'PODS_ROOT' => '${SRCROOT}',
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_paths),
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'SKIP_INSTALL' => 'YES',
'PRODUCT_BUNDLE_IDENTIFIER' => 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}', 'PRODUCT_BUNDLE_IDENTIFIER' => 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}',
'SKIP_INSTALL' => 'YES',
# 'USE_HEADERMAP' => 'NO' # 'USE_HEADERMAP' => 'NO'
} }
...@@ -61,7 +63,7 @@ module Pod ...@@ -61,7 +63,7 @@ module Pod
@xcconfig.merge!(file_accessor.spec_consumer.pod_target_xcconfig) @xcconfig.merge!(file_accessor.spec_consumer.pod_target_xcconfig)
end end
XCConfigHelper.add_target_specific_settings(target, @xcconfig) XCConfigHelper.add_target_specific_settings(target, @xcconfig)
XCConfigHelper.add_settings_for_dependent_targets(target, target.dependent_targets, @xcconfig) @xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, target.dependent_targets)
@xcconfig @xcconfig
end end
......
...@@ -219,7 +219,7 @@ module Pod ...@@ -219,7 +219,7 @@ module Pod
add_language_specific_settings(target, xcconfig) add_language_specific_settings(target, xcconfig)
end end
# Add the search paths for frameworks and libraries the given target # Returns the search paths for frameworks and libraries the given target
# depends on, so that it can be correctly built and linked. # depends on, so that it can be correctly built and linked.
# #
# @param [Target] target # @param [Target] target
...@@ -228,12 +228,9 @@ module Pod ...@@ -228,12 +228,9 @@ module Pod
# @param [Array<PodTarget>] dependent_targets # @param [Array<PodTarget>] dependent_targets
# The pod targets the given target depends on. # The pod targets the given target depends on.
# #
# @param [Xcodeproj::Config] xcconfig # @return [Hash<String, String>] the settings
# The xcconfig to edit.
# #
# @return [void] def self.settings_for_dependent_targets(target, dependent_targets)
#
def self.add_settings_for_dependent_targets(target, dependent_targets, xcconfig)
dependent_targets = dependent_targets.select(&:should_build?) dependent_targets = dependent_targets.select(&:should_build?)
has_configuration_build_dir = target.respond_to?(:configuration_build_dir) has_configuration_build_dir = target.respond_to?(:configuration_build_dir)
if has_configuration_build_dir if has_configuration_build_dir
...@@ -259,7 +256,7 @@ module Pod ...@@ -259,7 +256,7 @@ module Pod
build_settings['FRAMEWORK_SEARCH_PATHS'] = '$(inherited) ' + XCConfigHelper.quote(framework_search_paths.uniq) build_settings['FRAMEWORK_SEARCH_PATHS'] = '$(inherited) ' + XCConfigHelper.quote(framework_search_paths.uniq)
build_settings['LIBRARY_SEARCH_PATHS'] = '$(inherited) ' + XCConfigHelper.quote(library_search_paths.uniq) build_settings['LIBRARY_SEARCH_PATHS'] = '$(inherited) ' + XCConfigHelper.quote(library_search_paths.uniq)
end end
xcconfig.merge!(build_settings) build_settings
end end
# Checks if the given target requires language specific settings and # Checks if the given target requires language specific settings and
......
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