From 6a032c324f17fd70c26d33acd7efd67772c19a17 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 27 Jul 2021 15:03:21 +0300 Subject: [PATCH] replace existing options when generating xcconfigs --- xcode/config_generator/render_xcconfigs.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xcode/config_generator/render_xcconfigs.rb b/xcode/config_generator/render_xcconfigs.rb index c96c120..b19f063 100755 --- a/xcode/config_generator/render_xcconfigs.rb +++ b/xcode/config_generator/render_xcconfigs.rb @@ -102,7 +102,11 @@ targets.each do |target_name, target| # Add properties from settings file properties.each do |key, value| - config["xcconfig_options"].append(config_option(key, value)) + if config["xcconfig_options"].any? { |option| key == option["key"] } + config["xcconfig_options"].map! { |option| key == option["key"] ? config_option(key, value) : option } + else + config["xcconfig_options"].append(config_option(key, value)) + end end # Add missing properties if needed