Commit 849935d6 authored by Danielle Tomlinson's avatar Danielle Tomlinson Committed by GitHub

Merge pull request #6037 from dnkoutso/fix/5375

Generate a PODS_TARGET_SRCROOT build setting for every pod target
parents e2decfa3 c020eca3
......@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
* Generate `PODS_TARGET_SRCROOT` build setting for each pod target.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#5375](https://github.com/CocoaPods/CocoaPods/issues/5375)
* Add support for running CocoaPods on Linux.
[Samuel Giddins](https://github.com/segiddins)
......
......@@ -51,6 +51,7 @@ module Pod
'LIBRARY_SEARCH_PATHS' => '$(inherited) ',
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'PODS_ROOT' => '${SRCROOT}',
'PODS_TARGET_SRCROOT' => target.pod_target_srcroot,
'PRODUCT_BUNDLE_IDENTIFIER' => 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}',
'SKIP_INSTALL' => 'YES',
# 'USE_HEADERMAP' => 'NO'
......
......@@ -292,6 +292,12 @@ module Pod
"#{configuration_build_dir(dir)}/#{product_name}"
end
# @return [String] The source path of the root for this target relative to `$(PODS_ROOT)`
#
def pod_target_srcroot
"${PODS_ROOT}/#{sandbox.pod_dir(pod_name).relative_path_from(sandbox.root)}"
end
private
# @param [TargetDefinition] target_definition
......
Subproject commit b840101a6992392409e4419089bf3e55b25b3402
Subproject commit 80c9b1f2fa480c2fe801253776e5f0b18106e832
......@@ -79,6 +79,16 @@ module Pod
@xcconfig.to_hash['PODS_ROOT'].should.not.nil?
end
it 'sets the PODS_TARGET_SRCROOT build variable for non local pod' do
@xcconfig.to_hash['PODS_TARGET_SRCROOT'].should == '${PODS_ROOT}/BananaLib'
end
it 'sets the PODS_TARGET_SRCROOT build variable for local pod' do
@pod_target.sandbox.store_local_path(@pod_target.pod_name, @spec.defined_in_file)
@xcconfig = @generator.generate
@xcconfig.to_hash['PODS_TARGET_SRCROOT'].should == '${PODS_ROOT}/../../spec/fixtures/banana-lib/BananaLib.podspec'
end
it 'adds the library build headers and public headers search paths to the xcconfig, with quotes' do
private_headers = "\"#{@pod_target.build_headers.search_paths(:ios).join('" "')}\""
public_headers = "\"#{config.sandbox.public_headers.search_paths(:ios).join('" "')}\""
......
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