Commit 142d114b authored by Eloy Durán's avatar Eloy Durán

[AggregateTargetInstaller] Only pass around the build config name.

parent 79f78516
......@@ -11,11 +11,13 @@ module Pod
attr_reader :target
# @param [Target] target @see target
# @param [String] build_config Name of the build config to generate this xcconfig for
#
def initialize(target, build_config)
# @param [String] configuration_name Name of the build configuration to
# generate this xcconfig for.
#
def initialize(target, configuration_name)
@target = target
@build_config = build_config
@configuration_name = configuration_name
end
# @return [Xcodeproj::Config] The generated xcconfig.
......@@ -56,7 +58,7 @@ module Pod
})
target.pod_targets.each do |pod_target|
next unless pod_target.include_in_build_config?(@build_config)
next unless pod_target.include_in_build_config?(@configuration_name)
pod_target.file_accessors.each do |file_accessor|
XCConfigHelper.add_spec_build_settings_to_xcconfig(file_accessor.spec_consumer, @xcconfig)
......@@ -68,7 +70,8 @@ module Pod
end
end
# This is how the Pods project now links with dependencies, instead of a "Link with Libraries" build phase
# Add pod static lib to list of libraries that are to be linked with
# the user’s project.
@xcconfig.merge!({
'OTHER_LDFLAGS' => "-l#{pod_target.name}"
})
......
......@@ -35,7 +35,7 @@ module Pod
target.build_configurations.each do |build_config|
path = library.xcconfig_path build_config
UI.message "- Generating #{build_config.name} xcconfig file at #{UI.path(path)}" do
gen = Generator::XCConfig::AggregateXCConfig.new(library, build_config)
gen = Generator::XCConfig::AggregateXCConfig.new(library, build_config.name)
gen.save_as(path)
library.xcconfigs[build_config.name] = gen.xcconfig
xcconfig_file_ref = add_file_to_support_group(path)
......
......@@ -64,10 +64,11 @@ module Pod
end.flatten
end
# @param [String] build_config Name of the build configuration that caller is unsure if this target should
# be linked with.
def include_in_build_config?(build_config)
@target_definition.pod_whitelisted_for_configuration?(@specs[0].name, build_config)
# @param [String] configuration_name Name of the build configuration that
# the caller is unsure of if this target should be linked with.
#
def include_in_build_config?(configuration_name)
@target_definition.pod_whitelisted_for_configuration?(pod_name, configuration_name)
end
end
......
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