From e4a36e7d5ade0bf6eca624ab4750bcf992441774 Mon Sep 17 00:00:00 2001 From: Watson Date: Tue, 25 Nov 2014 11:33:43 +0900 Subject: [PATCH] [RM-671] solve framework dependencies in embedded --- lib/motion/project/xcode_config.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index 81799524..47124d19 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -201,8 +201,8 @@ EOS # Compute the list of frameworks, including dependencies, that the project uses. deps = frameworks.dup.uniq slf = File.join(sdk(local_platform), 'System', 'Library', 'Frameworks') - deps.each do |framework| - framework_path = File.join(slf, framework + '.framework', framework) + + find_dependencies = lambda { |framework_path| if File.exist?(framework_path) `#{locate_binary('otool')} -L \"#{framework_path}\"`.scan(/\t([^\s]+)\s\(/).each do |dep| # Only care about public, non-umbrella frameworks (for now). @@ -214,6 +214,14 @@ EOS end end end + } + deps.each do |framework| + framework_path = File.join(slf, framework + '.framework', framework) + find_dependencies.call(framework_path) + end + embedded_frameworks.each do |framework| + framework_path = File.expand_path(File.join(framework, File.basename(framework, ".framework"))) + find_dependencies.call(framework_path) end if @framework_search_paths.empty?