Commit 2087db1f authored by Joachim Bengtsson's avatar Joachim Bengtsson Committed by Eloy Durán

[integrator] Add build-specific xcconfig to builds

Also fixes some typos from previous commit. Different xcconfigs are now
actually generated, correctly assigned, and it all builds! Doesn't pass
tests and all xcconfigs are still identical, but still: getting there!
parent c3d23564
......@@ -84,7 +84,7 @@ module Pod
# @return [void]
#
def create_xcconfig_file
path = library.xcconfig_path
path = library.xcconfig_path nil
public_gen = Generator::XCConfig::PublicPodXCConfig.new(library)
UI.message "- Generating public xcconfig file at #{UI.path(path)}" do
public_gen.save_as(path)
......
......@@ -108,11 +108,12 @@ module Pod
# @return [void]
#
def add_xcconfig_base_configuration
xcconfig = user_project.files.select { |f| f.path == target.xcconfig_relative_path }.first ||
user_project.new_file(target.xcconfig_relative_path)
native_targets.each do |native_target|
check_overridden_build_settings(target.xcconfig, native_target)
native_target.build_configurations.each do |config|
relpath = target.xcconfig_relative_path config.name
xcconfig = user_project.files.select { |f| f.path == relpath }.first || user_project.new_file(relpath)
check_overridden_build_settings(target.xcconfigs[config.name], native_target)
config.base_configuration_reference = xcconfig
end
end
......
......@@ -77,10 +77,16 @@ module Pod
@sandbox.library_support_files_dir(name)
end
# @param [String] variant (optional) If you have multiple variants of xcconfigs for this target
# => (e g per build configuration), provide the variant type here.
# @return [Pathname] the absolute path of the xcconfig file.
#
def xcconfig_path variant
support_files_root + "#{label}-#{variant}.xcconfig"
if variant then
support_files_root + "#{label}.#{variant}.xcconfig"
else
support_files_root + "#{label}.xcconfig"
end
end
# @return [Pathname] the absolute path of the private xcconfig file.
......
......@@ -97,7 +97,7 @@ module Pod
# the user project.
#
def xcconfig_relative_path config_name
relative_to_srcroot(xcconfig_path, config_name).to_s
relative_to_srcroot(xcconfig_path config_name).to_s
end
# @return [String] The path of the copy resources script relative to the
......
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