Commit 187ce57c authored by Samuel Giddins's avatar Samuel Giddins

Merge pull request #4469 from andreacremaschi/master

parents e8c9366e 08b6aa5e
......@@ -11,7 +11,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
* Improve `pod search` performance while using _`--full`_ flag
[Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
[cocoapods-search#8](https://github.com/CocoaPods/cocoapods-search/issues/8)
* Improve message when there is no spec in repos for dependency set in Podfile.
[Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
[#4430](https://github.com/CocoaPods/CocoaPods/issues/4430)
......@@ -82,6 +82,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#3683](https://github.com/CocoaPods/CocoaPods/issues/3683)
* Remove the library name's extension when adding it in the "linker flags" build
setting to support dynamic libraries.
[Andrea Cremaschi](https://github.com/andreacremaschi)
[#4468](https://github.com/CocoaPods/CocoaPods/issues/4468)
## 0.39.0 (2015-10-09)
......
......@@ -153,7 +153,8 @@ module Pod
# The path retrieved from Sandbox#root.
#
def self.add_library_build_settings(library_path, xcconfig, sandbox_root)
name = File.basename(library_path, '.a').sub(/\Alib/, '')
extension = File.extname(library_path)
name = File.basename(library_path, extension).sub(/\Alib/, '')
dirname = '${PODS_ROOT}/' + library_path.dirname.relative_path_from(sandbox_root).to_s
build_settings = {
'OTHER_LDFLAGS' => "-l#{name}",
......
......@@ -158,6 +158,15 @@ module Pod
hash_config['OTHER_LDFLAGS'].should == '-l"Proj4"'
hash_config['LIBRARY_SEARCH_PATHS'].should == '$(inherited) "${PODS_ROOT}/MapBox/Proj4"'
end
it 'adds dylib build settings to the given xcconfig' do
path = config.sandbox.root + 'MapBox/Proj4/libProj4.dylib'
xcconfig = Xcodeproj::Config.new
@sut.add_library_build_settings(path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == '-l"Proj4"'
hash_config['LIBRARY_SEARCH_PATHS'].should == '$(inherited) "${PODS_ROOT}/MapBox/Proj4"'
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