Commit 3f915e5e authored by Marius Rackwitz's avatar Marius Rackwitz

[PodTarget] Introduce #build_product_path

parent c774957d
...@@ -97,7 +97,7 @@ module Pod ...@@ -97,7 +97,7 @@ module Pod
if target.requires_frameworks? if target.requires_frameworks?
build_pod_targets = pod_targets.select(&:should_build?) build_pod_targets = pod_targets.select(&:should_build?)
framework_header_search_paths = build_pod_targets.map do |target| framework_header_search_paths = build_pod_targets.map do |target|
"#{target.configuration_build_dir}/#{target.product_name}/Headers" "#{target.build_product_path}/Headers"
end end
build_settings = { build_settings = {
# Make framework headers discoverable by `import "…"` # Make framework headers discoverable by `import "…"`
......
...@@ -151,7 +151,7 @@ module Pod ...@@ -151,7 +151,7 @@ module Pod
end end
frameworks_by_config[config] = relevant_pod_targets.flat_map do |pod_target| frameworks_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
frameworks = pod_target.file_accessors.flat_map(&:vendored_dynamic_artifacts).map { |fw| "${PODS_ROOT}/#{fw.relative_path_from(sandbox.root)}" } frameworks = pod_target.file_accessors.flat_map(&:vendored_dynamic_artifacts).map { |fw| "${PODS_ROOT}/#{fw.relative_path_from(sandbox.root)}" }
frameworks << "#{pod_target.label}/#{pod_target.product_name}" if pod_target.should_build? && pod_target.requires_frameworks? frameworks << pod_target.build_product_path if pod_target.should_build? && pod_target.requires_frameworks?
frameworks frameworks
end end
end end
......
...@@ -264,6 +264,15 @@ module Pod ...@@ -264,6 +264,15 @@ module Pod
"#{dir}/#{label}" "#{dir}/#{label}"
end end
# @param [String] dir
# @see #configuration_build_dir
#
# @return [String] The absolute path to the build product
#
def build_product_path(dir = '$CONFIGURATION_BUILD_DIR')
"#{configuration_build_dir(dir)}/#{product_name}"
end
private private
# @param [TargetDefinition] target_definition # @param [TargetDefinition] target_definition
......
Subproject commit 256f6d0f99105687c413d9900a6a4f1bdc327bdb Subproject commit b57d990760c8c1bca6fd34b5887094a1ae7106ba
...@@ -174,6 +174,13 @@ module Pod ...@@ -174,6 +174,13 @@ module Pod
@pod_target.configuration_build_dir('$PODS_SHARED_BUILD_DIR').should == '$PODS_SHARED_BUILD_DIR/BananaLib' @pod_target.configuration_build_dir('$PODS_SHARED_BUILD_DIR').should == '$PODS_SHARED_BUILD_DIR/BananaLib'
@pod_target.scoped.first.configuration_build_dir('$PODS_SHARED_BUILD_DIR').should == '$PODS_SHARED_BUILD_DIR/BananaLib-Pods' @pod_target.scoped.first.configuration_build_dir('$PODS_SHARED_BUILD_DIR').should == '$PODS_SHARED_BUILD_DIR/BananaLib-Pods'
end end
it 'returns the path for the CONFIGURATION_BUILD_DIR build setting' do
@pod_target.build_product_path.should == '$CONFIGURATION_BUILD_DIR/BananaLib/libBananaLib.a'
@pod_target.scoped.first.build_product_path.should == '$CONFIGURATION_BUILD_DIR/BananaLib-Pods/libBananaLib-Pods.a'
@pod_target.build_product_path('$BUILT_PRODUCTS_DIR').should == '$BUILT_PRODUCTS_DIR/BananaLib/libBananaLib.a'
@pod_target.scoped.first.build_product_path('$BUILT_PRODUCTS_DIR').should == '$BUILT_PRODUCTS_DIR/BananaLib-Pods/libBananaLib-Pods.a'
end
end end
describe 'Product type dependent helpers' do describe 'Product type dependent helpers' do
......
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