Unverified Commit d1086378 authored by D. Koutsogiorgas's avatar D. Koutsogiorgas Committed by GitHub

Merge pull request #7723 from CocoaPods/segiddins/vendored-static-lib-link-into-dynamic-framework

Link vendored static libraries into dynamic frameworks
parents 96c49212 ac34b4a7
......@@ -603,8 +603,7 @@ module Pod
define_build_settings_method :libraries, :memoized => true, :sorted => true, :uniqued => true do
return [] if (!target.requires_frameworks? || target.static_framework?) && !test_xcconfig?
libraries = vendored_dynamic_libraries.map { |l| File.basename(l, l.extname).sub(/\Alib/, '') }
libraries.concat spec_consumers.flat_map(&:libraries)
libraries = libraries_to_import.dup
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
......@@ -630,7 +629,9 @@ module Pod
# @return [Array<String>]
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 }
if test_xcconfig?
vendored.concat dependent_targets.flat_map { |t| t.build_settings.library_search_paths_to_import }
......
......@@ -220,7 +220,8 @@ module Pod
@generator.spec_consumers.each { |sc| sc.stubs(:frameworks => []) }
@generator.stubs(:dependent_targets => [pod_target])
@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
......
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