Commit 7c740de7 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'issue_1558_Framework_Search_Paths' of…

Merge branch 'issue_1558_Framework_Search_Paths' of https://github.com/kwales/CocoaPods into kwales-issue_1558_Framework_Search_Paths

* 'issue_1558_Framework_Search_Paths' of https://github.com/kwales/CocoaPods:
  Updated unit tests
  sets framework_search_paths conditionally based on platform
  Changed order of Framework_Search_Paths fixes #1558

Conflicts:
	CHANGELOG.md
parents 9f03ab97 3464fca6
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html). To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
###### Bug Fixes
* Fixed the developer frameworks search paths so that
`$(SDKROOT)/Developer/Library/Frameworks` is used for iOS and
`$(DEVELOPER_LIBRARY_DIR)/Frameworks` is used for OS X
[Kevin Wales](https://github.com/kwales)
[#1562](https://github.com/CocoaPods/pull/1562)
## 0.28.0 ## 0.28.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.27.1...0.28.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.27.1...0.28.0)
[CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.27.1...0.28.0) [CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.27.1...0.28.0)
......
...@@ -103,9 +103,10 @@ module Pod ...@@ -103,9 +103,10 @@ module Pod
search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= '' search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= ''
search_paths_to_add = [] search_paths_to_add = []
search_paths_to_add << '$(inherited)' search_paths_to_add << '$(inherited)'
search_paths_to_add << '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
if platform == :ios if platform == :ios
search_paths_to_add << '"$(SDKROOT)/Developer/Library/Frameworks"' search_paths_to_add << '"$(SDKROOT)/Developer/Library/Frameworks"'
else
search_paths_to_add << '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end end
search_paths_to_add.each do |search_path| search_paths_to_add.each do |search_path|
unless search_paths.include?(search_path) unless search_paths.include?(search_path)
......
...@@ -94,7 +94,7 @@ module Pod ...@@ -94,7 +94,7 @@ module Pod
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-weak_framework iAd' xcconfig.to_hash['OTHER_LDFLAGS'].should == '-weak_framework iAd'
end end
it "adds the developer frameworks search paths if needed" do it "adds the ios developer frameworks search paths if needed" do
xcconfig = Xcodeproj::Config.new xcconfig = Xcodeproj::Config.new
consumer = stub({ consumer = stub({
:xcconfig => {}, :xcconfig => {},
...@@ -104,7 +104,22 @@ module Pod ...@@ -104,7 +104,22 @@ 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['FRAMEWORK_SEARCH_PATHS'].should.include('SDKROOT')
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.not.include('DEVELOPER_LIBRARY_DIR')
end
it "adds the osx developer frameworks search paths if needed" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => [],
:frameworks => ['SenTestingKit'],
:weak_frameworks => [],
:platform_name => :osx
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.include('DEVELOPER_LIBRARY_DIR') xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.include('DEVELOPER_LIBRARY_DIR')
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.not.include('SDKROOT')
end end
end end
...@@ -159,7 +174,7 @@ module Pod ...@@ -159,7 +174,7 @@ module Pod
frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'] frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
frameworks_search_paths.should.include?('$(inherited)') frameworks_search_paths.should.include?('$(inherited)')
frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"') frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"')
frameworks_search_paths.should.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"') frameworks_search_paths.should.not.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
end end
it "adds the developer frameworks search paths to the xcconfig if XCTest has been detected" do it "adds the developer frameworks search paths to the xcconfig if XCTest has been detected" do
...@@ -168,7 +183,7 @@ module Pod ...@@ -168,7 +183,7 @@ module Pod
frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'] frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
frameworks_search_paths.should.include?('$(inherited)') frameworks_search_paths.should.include?('$(inherited)')
frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"') frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"')
frameworks_search_paths.should.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"') frameworks_search_paths.should.not.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
end end
it "doesn't adds the developer frameworks relative to the SDK for OS X" do it "doesn't adds the developer frameworks relative to the SDK for OS X" 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