Commit 61c1ae80 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4807 from dnkoutso/master

Generate valid xcconfig when target includes spaces
parents 1626b8a1 6720ef33
......@@ -10,7 +10,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Properly add resource files to resources build phase.
* Generate valid xcconfig when target name includes spaces.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#4783](https://github.com/CocoaPods/CocoaPods/issues/4783)
* Properly add resource files to resources build phase.
[Eric Firestone](https://github.com/efirestone)
[#4762](https://github.com/CocoaPods/CocoaPods/issues/4762)
......
......@@ -102,7 +102,7 @@ module Pod
end
end
build_settings = {
'PODS_FRAMEWORK_BUILD_PATH' => target.scoped_configuration_build_dir,
'PODS_FRAMEWORK_BUILD_PATH' => XCConfigHelper.quote([target.scoped_configuration_build_dir]),
# Make framework headers discoverable by `import "…"`
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'),
}
......@@ -113,7 +113,7 @@ module Pod
build_settings['OTHER_CFLAGS'] += ' ' + XCConfigHelper.quote(library_header_search_paths, '-isystem')
end
if pod_targets.any? { |t| t.should_build? && t.scoped? }
build_settings['FRAMEWORK_SEARCH_PATHS'] = '"$PODS_FRAMEWORK_BUILD_PATH"'
build_settings['FRAMEWORK_SEARCH_PATHS'] = '$PODS_FRAMEWORK_BUILD_PATH'
end
build_settings
else
......
......@@ -58,11 +58,9 @@ module Pod
@xcconfig = Xcodeproj::Config.new(config)
if target.requires_frameworks? && target.scoped?
# Only quote the FRAMEWORK_SEARCH_PATHS entry, because it’s a setting that takes multiple values.
# In addition, quoting CONFIGURATION_BUILD_DIR would make it be interpreted as a relative path.
build_settings = {
'PODS_FRAMEWORK_BUILD_PATH' => target.configuration_build_dir,
'FRAMEWORK_SEARCH_PATHS' => '"$PODS_FRAMEWORK_BUILD_PATH"',
'PODS_FRAMEWORK_BUILD_PATH' => XCConfigHelper.quote([target.configuration_build_dir]),
'FRAMEWORK_SEARCH_PATHS' => '$PODS_FRAMEWORK_BUILD_PATH',
'CONFIGURATION_BUILD_DIR' => '$PODS_FRAMEWORK_BUILD_PATH',
}
@xcconfig.merge!(build_settings)
......
Subproject commit 3c74dd99cf532ba61336e940f79fb8b02467a65b
Subproject commit bfd098b2ee45861951a200f609dbe7d7a1485628
......@@ -189,7 +189,7 @@ module Pod
end
it 'sets the PODS_FRAMEWORK_BUILD_PATH build variable' do
@xcconfig.to_hash['PODS_FRAMEWORK_BUILD_PATH'].should == '$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods'
@xcconfig.to_hash['PODS_FRAMEWORK_BUILD_PATH'].should == '"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods"'
end
describe 'with a scoped pod target' do
......@@ -198,7 +198,7 @@ module Pod
end
it 'adds the framework build path to the xcconfig, with quotes, as framework search paths' do
@xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "$PODS_FRAMEWORK_BUILD_PATH"'
@xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) $PODS_FRAMEWORK_BUILD_PATH'
end
it 'adds the framework header paths to the xcconfig, with quotes, as local headers' 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