Commit ac34b4a7 authored by Samuel Giddins's avatar Samuel Giddins

Link vendored static libraries into dynamic frameworks

This fixes missing symbol errors at link time

This mirrors the treatment vendored static libraries get
parent 96c49212
...@@ -603,8 +603,7 @@ module Pod ...@@ -603,8 +603,7 @@ module Pod
define_build_settings_method :libraries, :memoized => true, :sorted => true, :uniqued => true do define_build_settings_method :libraries, :memoized => true, :sorted => true, :uniqued => true do
return [] if (!target.requires_frameworks? || target.static_framework?) && !test_xcconfig? return [] if (!target.requires_frameworks? || target.static_framework?) && !test_xcconfig?
libraries = vendored_dynamic_libraries.map { |l| File.basename(l, l.extname).sub(/\Alib/, '') } libraries = libraries_to_import.dup
libraries.concat spec_consumers.flat_map(&:libraries)
libraries.concat dependent_targets.flat_map { |pt| pt.build_settings.dynamic_libraries_to_import } libraries.concat dependent_targets.flat_map { |pt| pt.build_settings.dynamic_libraries_to_import }
libraries.concat dependent_targets.flat_map { |pt| pt.build_settings.static_libraries_to_import } if test_xcconfig? libraries.concat dependent_targets.flat_map { |pt| pt.build_settings.static_libraries_to_import } if test_xcconfig?
libraries libraries
...@@ -630,7 +629,9 @@ module Pod ...@@ -630,7 +629,9 @@ module Pod
# @return [Array<String>] # @return [Array<String>]
define_build_settings_method :library_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do define_build_settings_method :library_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
vendored = vendored_dynamic_library_search_paths.dup return [] if (!target.requires_frameworks? || target.static_framework?) && !test_xcconfig?
vendored = library_search_paths_to_import.dup
vendored.concat dependent_targets.flat_map { |t| t.build_settings.vendored_dynamic_library_search_paths } vendored.concat dependent_targets.flat_map { |t| t.build_settings.vendored_dynamic_library_search_paths }
if test_xcconfig? if test_xcconfig?
vendored.concat dependent_targets.flat_map { |t| t.build_settings.library_search_paths_to_import } vendored.concat dependent_targets.flat_map { |t| t.build_settings.library_search_paths_to_import }
......
...@@ -220,7 +220,8 @@ module Pod ...@@ -220,7 +220,8 @@ module Pod
@generator.spec_consumers.each { |sc| sc.stubs(:frameworks => []) } @generator.spec_consumers.each { |sc| sc.stubs(:frameworks => []) }
@generator.stubs(:dependent_targets => [pod_target]) @generator.stubs(:dependent_targets => [pod_target])
@generator.send :__clear__ @generator.send :__clear__
@generator.other_ldflags.should.be == %w(-l"VendoredDyld" -l"xml2" -framework "Bananalib" -framework "VendoredFramework" -framework "XCTest" -weak_framework "iAd") @generator.other_ldflags.should.
be == %w(-l"Bananalib" -l"VendoredDyld" -l"xml2" -framework "Bananalib" -framework "VendoredFramework" -framework "XCTest" -weak_framework "iAd")
end end
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