Commit 91b1699f authored by Tyler Stromberg's avatar Tyler Stromberg

Also quote library names

parent 70c2f308
...@@ -247,7 +247,7 @@ module Pod ...@@ -247,7 +247,7 @@ module Pod
build_settings = { build_settings = {
'LIBRARY_SEARCH_PATHS' => quote([dirname]), 'LIBRARY_SEARCH_PATHS' => quote([dirname]),
} }
build_settings['OTHER_LDFLAGS'] = "-l#{name}" if include_ld_flags build_settings['OTHER_LDFLAGS'] = "-l\"#{name}\"" if include_ld_flags
xcconfig.merge!(build_settings) xcconfig.merge!(build_settings)
end end
......
...@@ -161,10 +161,14 @@ module Pod ...@@ -161,10 +161,14 @@ module Pod
it 'quotes OTHER_LDFLAGS to properly handle spaces' do it 'quotes OTHER_LDFLAGS to properly handle spaces' do
framework_path = config.sandbox.root + 'Sample/Framework with Spaces.framework' framework_path = config.sandbox.root + 'Sample/Framework with Spaces.framework'
library_path = config.sandbox.root + 'Sample/libSample Lib.a'
xcconfig = Xcodeproj::Config.new xcconfig = Xcodeproj::Config.new
@sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root) @sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root)
@sut.add_library_build_settings(library_path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == '-framework "Framework with Spaces"' hash_config['OTHER_LDFLAGS'].should == '-l"Sample Lib" -framework "Framework with Spaces"'
end end
it 'check that include_ld_flags being false doesnt generate OTHER_LDFLAGS' do it 'check that include_ld_flags being false doesnt generate OTHER_LDFLAGS' 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