Commit 2ef0db19 authored by Fabio Pelosin's avatar Fabio Pelosin

[Xcodeproj]: Fix issue for libraries with a space in the name

parent a81d8161
...@@ -18,7 +18,7 @@ GIT ...@@ -18,7 +18,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 96d04e9f2d96b848bb36d5fe214843f8cfac2664 revision: 730a09310e986bb2ec5430ef303f8453537d01ac
branch: master branch: master
specs: specs:
xcodeproj (0.18.0) xcodeproj (0.18.0)
......
...@@ -73,8 +73,9 @@ module Pod ...@@ -73,8 +73,9 @@ module Pod
# Add pod static lib to list of libraries that are to be linked with # Add pod static lib to list of libraries that are to be linked with
# the user’s project. # the user’s project.
@xcconfig.merge!({ @xcconfig.merge!({
'OTHER_LDFLAGS' => "-l#{pod_target.name}" 'OTHER_LDFLAGS' => %Q(-l "#{pod_target.name}")
}) })
end end
......
Subproject commit a25af1f983d611cc1e709680ed9af26e9fa3bb29 Subproject commit 3200e10190c6892b837e5ef3b87c2a2a612f69b6
...@@ -75,7 +75,7 @@ module Pod ...@@ -75,7 +75,7 @@ module Pod
end end
it "links the pod targets with the aggregate integration library target" do it "links the pod targets with the aggregate integration library target" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-lPods-BananaLib' @xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-l "Pods-BananaLib"'
end end
it "does not links the pod targets with the aggregate integration library target for non-whitelisted configuration" do it "does not links the pod targets with the aggregate integration library target for non-whitelisted configuration" do
......
...@@ -36,15 +36,15 @@ module Pod ...@@ -36,15 +36,15 @@ module Pod
end end
it "includes the libraries for the specifications" do it "includes the libraries for the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-lxml2') @xcconfig.to_hash["OTHER_LDFLAGS"].should.include(%q(-l "xml2"))
end end
it "includes the frameworks of the specifications" do it "includes the frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-framework QuartzCore') @xcconfig.to_hash["OTHER_LDFLAGS"].should.include(%q(-framework "QuartzCore"))
end end
it "includes the weak-frameworks of the specifications" do it "includes the weak-frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-weak_framework iAd') @xcconfig.to_hash["OTHER_LDFLAGS"].should.include(%q(-weak_framework "iAd"))
end end
it "includes the developer frameworks search paths when SenTestingKit is detected" do it "includes the developer frameworks search paths when SenTestingKit is detected" do
......
...@@ -57,7 +57,7 @@ module Pod ...@@ -57,7 +57,7 @@ module Pod
:platform_name => :ios :platform_name => :ios
}) })
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig) @sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-framework SenTestingKit' xcconfig.to_hash['OTHER_LDFLAGS'].should == %q(-framework "SenTestingKit")
end end
it "adds the libraries of the xcconfig" do it "adds the libraries of the xcconfig" do
...@@ -70,7 +70,7 @@ module Pod ...@@ -70,7 +70,7 @@ module Pod
:platform_name => :ios :platform_name => :ios
}) })
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig) @sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-lxml2' xcconfig.to_hash['OTHER_LDFLAGS'].should == %q(-l "xml2")
end end
it "adds the frameworks of the xcconfig" do it "adds the frameworks of the xcconfig" do
...@@ -83,7 +83,7 @@ module Pod ...@@ -83,7 +83,7 @@ module Pod
:platform_name => :ios :platform_name => :ios
}) })
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig) @sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-framework CoreAnimation' xcconfig.to_hash['OTHER_LDFLAGS'].should == %q(-framework "CoreAnimation")
end end
it "adds the weak frameworks of the xcconfig" do it "adds the weak frameworks of the xcconfig" do
...@@ -96,7 +96,7 @@ module Pod ...@@ -96,7 +96,7 @@ module Pod
:platform_name => :ios :platform_name => :ios
}) })
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig) @sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-weak_framework iAd' xcconfig.to_hash['OTHER_LDFLAGS'].should == %q(-weak_framework "iAd")
end end
it "adds the ios developer frameworks search paths if needed" do it "adds the ios developer frameworks search paths if needed" do
...@@ -136,7 +136,7 @@ module Pod ...@@ -136,7 +136,7 @@ module Pod
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)
hash_config = xcconfig.to_hash hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-framework Parse" hash_config['OTHER_LDFLAGS'].should == %q(-framework "Parse")
hash_config['FRAMEWORK_SEARCH_PATHS'].should == '"$(PODS_ROOT)/Parse"' hash_config['FRAMEWORK_SEARCH_PATHS'].should == '"$(PODS_ROOT)/Parse"'
end end
...@@ -145,7 +145,7 @@ module Pod ...@@ -145,7 +145,7 @@ module Pod
xcconfig = Xcodeproj::Config.new( { 'OTHER_LDFLAGS' => '-framework CoreAnimation' } ) xcconfig = Xcodeproj::Config.new( { 'OTHER_LDFLAGS' => '-framework CoreAnimation' } )
@sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root) @sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-framework CoreAnimation -framework Parse" hash_config['OTHER_LDFLAGS'].should == %q(-framework "CoreAnimation" -framework "Parse")
end end
it "doesn't ovverides exiting frameworks search paths" do it "doesn't ovverides exiting frameworks search paths" do
...@@ -165,7 +165,7 @@ module Pod ...@@ -165,7 +165,7 @@ module Pod
xcconfig = Xcodeproj::Config.new xcconfig = Xcodeproj::Config.new
@sut.add_library_build_settings(path, xcconfig, config.sandbox.root) @sut.add_library_build_settings(path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-lProj4" hash_config['OTHER_LDFLAGS'].should == %q(-l "Proj4")
hash_config['LIBRARY_SEARCH_PATHS'].should == '"$(PODS_ROOT)/MapBox/Proj4"' hash_config['LIBRARY_SEARCH_PATHS'].should == '"$(PODS_ROOT)/MapBox/Proj4"'
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