Commit 39ba796a authored by Samuel E. Giddins's avatar Samuel E. Giddins

[PodTarget] Add framework search paths of dependent pod targets

parent 6fdf3d6d
......@@ -123,7 +123,7 @@ module Pod
['--no-clean', 'Lint leaves the build directory intact for inspection'],
['--fail-fast', 'Lint stops on the first failing platform or subspec'],
['--use-libraries', 'Lint uses static libraries to install the spec'],
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependant pods ' \
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
'(defaults to https://github.com/CocoaPods/Specs.git). ' \
'Multiple sources must be comma-delimited.'],
['--private', 'Lint skips checks that apply only to public specs'],
......
......@@ -23,7 +23,7 @@ module Pod
[
['--allow-warnings', 'Allows pushing even if there are warnings'],
['--use-libraries', 'Linter uses static libraries to install the spec'],
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependant pods ' \
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
'(defaults to all available repos). ' \
'Multiple sources must be comma-delimited.'],
['--local-only', 'Does not perform the step of pushing REPO to its remote'],
......
......@@ -23,7 +23,7 @@ module Pod
['--no-clean', 'Lint leaves the build directory intact for inspection'],
['--fail-fast', 'Lint stops on the first failing platform or subspec'],
['--use-libraries', 'Lint uses static libraries to install the spec'],
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependant pods ' \
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
'(defaults to https://github.com/CocoaPods/Specs.git). ' \
'Multiple sources must be comma-delimited.'],
['--private', 'Lint skips checks that apply only to public specs'],
......
......@@ -43,6 +43,7 @@ module Pod
target_search_paths = target.build_headers.search_paths(target.platform)
sandbox_search_paths = target.sandbox.public_headers.search_paths(target.platform)
search_paths = target_search_paths.concat(sandbox_search_paths).uniq
framework_search_paths = target.dependent_targets.flat_map(&:file_accessors).flat_map(&:vendored_frameworks).map { |fw| '${PODS_ROOT}/' << fw.dirname.relative_path_from(target.sandbox.root).to_s}
config = {
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
......@@ -50,6 +51,7 @@ module Pod
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_paths),
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'SKIP_INSTALL' => 'YES',
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) ' << XCConfigHelper.quote(framework_search_paths)
# 'USE_HEADERMAP' => 'NO'
}
......
......@@ -306,6 +306,7 @@ module Pod
# transitive dependencies can't be deduplicated.
pod_targets.flat_map do |target|
dependent_targets = transitive_dependencies_for_pod_target(target, pod_targets)
target.dependent_targets = dependent_targets
if dependent_targets.any?(&:scoped?)
target.scoped
else
......
......@@ -112,7 +112,10 @@ module Pod
# @todo This can be removed for CocoaPods 1.0
#
def update_to_cocoapods_0_37_1
(native_targets - native_targets_to_embed_in).any? do |native_target|
targets_to_embed = native_targets.select do |target|
EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
end
(native_targets - targets_to_embed).any? do |native_target|
remove_embed_frameworks_script_phase(native_target)
end
end
......@@ -124,10 +127,7 @@ module Pod
# @todo This can be removed for CocoaPods 1.0
#
def update_to_cocoapods_0_39
targets_to_embed_in = native_targets_to_integrate.select do |target|
EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
end
requires_update = targets_to_embed_in.any? do |target|
requires_update = native_targets_to_embed_in.any? do |target|
!target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
end
if requires_update
......
......@@ -33,6 +33,11 @@ module Pod
attr_reader :scoped
alias_method :scoped?, :scoped
# @return [Array<PodTarget>] the targets that this target has a dependency
# upon.
#
attr_accessor :dependent_targets
# @param [Array<Specification>] @spec #see spec
# @param [Array<TargetDefinition>] target_definitions @see target_definitions
# @param [Sandbox] sandbox @see sandbox
......
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