Commit 271f9e7b authored by Marius Rackwitz's avatar Marius Rackwitz Committed by Samuel Giddins

[Installer] Integrate the aggregate target as static

Even with 'use_frameworks!'.
parent 0e8ebf0a
...@@ -47,6 +47,7 @@ module Pod ...@@ -47,6 +47,7 @@ module Pod
'OTHER_LIBTOOLFLAGS' => '', 'OTHER_LIBTOOLFLAGS' => '',
'PODS_ROOT' => '$(SRCROOT)', 'PODS_ROOT' => '$(SRCROOT)',
'SKIP_INSTALL' => 'YES', 'SKIP_INSTALL' => 'YES',
'MACH_O_TYPE' => 'staticlib',
} }
super.merge(settings) super.merge(settings)
end end
......
...@@ -44,6 +44,7 @@ module Pod ...@@ -44,6 +44,7 @@ module Pod
update_to_cocoapods_0_34, update_to_cocoapods_0_34,
update_to_cocoapods_0_37_1, update_to_cocoapods_0_37_1,
update_to_cocoapods_0_39, update_to_cocoapods_0_39,
update_to_cocoapods_0_40,
unless native_targets_to_integrate.empty? unless native_targets_to_integrate.empty?
add_pods_library add_pods_library
add_embed_frameworks_script_phase add_embed_frameworks_script_phase
...@@ -161,15 +162,8 @@ module Pod ...@@ -161,15 +162,8 @@ module Pod
target_basename = target.product_basename target_basename = target.product_basename
new_product_ref = frameworks.files.find { |f| f.path == target.product_name } || new_product_ref = frameworks.files.find { |f| f.path == target.product_name } ||
frameworks.new_product_ref_for_target(target_basename, target.product_type) frameworks.new_product_ref_for_target(target_basename, target.product_type)
build_file = build_phase.build_file(new_product_ref) || build_phase.build_file(new_product_ref) ||
build_phase.add_file_reference(new_product_ref, true) build_phase.add_file_reference(new_product_ref, true)
if target.requires_frameworks?
# Weak link the aggregate target's product, because as it contains
# no symbols, it isn't copied into the app bundle. dyld will so
# never try to find the missing executable at runtime.
build_file.settings ||= {}
build_file.settings['ATTRIBUTES'] = ['Weak']
end
end end
end end
......
...@@ -101,6 +101,13 @@ module Pod ...@@ -101,6 +101,13 @@ module Pod
end end
end end
it 'will be built as static library' do
@installer.install!
@installer.target.native_target.build_configurations.each do |config|
config.build_settings['MACH_O_TYPE'].should == 'staticlib'
end
end
it 'will be skipped when installing' do it 'will be skipped when installing' do
@installer.install! @installer.install!
@installer.target.native_target.build_configurations.each do |config| @installer.target.native_target.build_configurations.each do |config|
......
...@@ -73,7 +73,6 @@ module Pod ...@@ -73,7 +73,6 @@ module Pod
phase = target.frameworks_build_phase phase = target.frameworks_build_phase
build_file = phase.files.find { |f| f.file_ref.path == 'Pods.framework' } build_file = phase.files.find { |f| f.file_ref.path == 'Pods.framework' }
build_file.should.not.be.nil build_file.should.not.be.nil
build_file.settings['ATTRIBUTES'].should == %w(Weak)
end end
it 'adds a Copy Pods Resources build phase to each target' do it 'adds a Copy Pods Resources build phase to each target' do
......
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