Commit 8e1ba8f2 authored by Boris Bügling's avatar Boris Bügling

Merge pull request #4063 from smileyborg/fix-missing-inherited2

[Generator] Fix missing `$(inherited)` in xcconfig build settings
parents 29bf49ba 1636b06d
...@@ -32,6 +32,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -32,6 +32,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
* Embed frameworks into app and watch extensions. * Embed frameworks into app and watch extensions.
[Boris Bügling](https://github.com/neonichu) [Boris Bügling](https://github.com/neonichu)
[#4004](https://github.com/CocoaPods/CocoaPods/pull/4004) [#4004](https://github.com/CocoaPods/CocoaPods/pull/4004)
* Fix missing `$(inherited)` for generated xcconfig `LIBRARY_SEARCH_PATHS` and `HEADER_SEARCH_PATHS` build settings.
[Tyler Fox](https://github.com/smileyborg)
[#3908](https://github.com/CocoaPods/CocoaPods/issues/3908)
##### Enhancements ##### Enhancements
......
...@@ -106,9 +106,9 @@ module Pod ...@@ -106,9 +106,9 @@ module Pod
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'), 'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'),
} }
if pod_targets.any? { |t| !t.should_build? } if pod_targets.any? { |t| !t.should_build? }
# Make library headers discoverale by `#import "…"` # Make library headers discoverable by `#import "…"`
library_header_search_paths = target.sandbox.public_headers.search_paths(target.platform) library_header_search_paths = target.sandbox.public_headers.search_paths(target.platform)
build_settings['HEADER_SEARCH_PATHS'] = XCConfigHelper.quote(library_header_search_paths) build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ' + XCConfigHelper.quote(library_header_search_paths)
build_settings['OTHER_CFLAGS'] += ' ' + XCConfigHelper.quote(library_header_search_paths, '-isystem') build_settings['OTHER_CFLAGS'] += ' ' + XCConfigHelper.quote(library_header_search_paths, '-isystem')
end end
if pod_targets.any? { |t| t.should_build? && t.scoped? } if pod_targets.any? { |t| t.should_build? && t.scoped? }
......
...@@ -116,7 +116,7 @@ module Pod ...@@ -116,7 +116,7 @@ module Pod
dirname = '$(PODS_ROOT)/' + library_path.dirname.relative_path_from(sandbox_root).to_s dirname = '$(PODS_ROOT)/' + library_path.dirname.relative_path_from(sandbox_root).to_s
build_settings = { build_settings = {
'OTHER_LDFLAGS' => "-l#{name}", 'OTHER_LDFLAGS' => "-l#{name}",
'LIBRARY_SEARCH_PATHS' => quote([dirname]), 'LIBRARY_SEARCH_PATHS' => '$(inherited) ' + quote([dirname]),
} }
xcconfig.merge!(build_settings) xcconfig.merge!(build_settings)
end end
......
...@@ -181,6 +181,11 @@ module Pod ...@@ -181,6 +181,11 @@ module Pod
expected = '${PODS_ROOT}/Headers/Public' expected = '${PODS_ROOT}/Headers/Public'
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include expected @xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include expected
end end
it 'includes $(inherited) in the header search paths' do
expected = '$(inherited)'
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include expected
end
end end
it 'sets the PODS_FRAMEWORK_BUILD_PATH build variable' do it 'sets the PODS_FRAMEWORK_BUILD_PATH build variable' do
......
...@@ -156,7 +156,7 @@ module Pod ...@@ -156,7 +156,7 @@ module Pod
@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 == '-l"Proj4"' hash_config['OTHER_LDFLAGS'].should == '-l"Proj4"'
hash_config['LIBRARY_SEARCH_PATHS'].should == '"$(PODS_ROOT)/MapBox/Proj4"' hash_config['LIBRARY_SEARCH_PATHS'].should == '$(inherited) "$(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