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` ...@@ -10,7 +10,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### 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) [Eric Firestone](https://github.com/efirestone)
[#4762](https://github.com/CocoaPods/CocoaPods/issues/4762) [#4762](https://github.com/CocoaPods/CocoaPods/issues/4762)
......
...@@ -102,7 +102,7 @@ module Pod ...@@ -102,7 +102,7 @@ module Pod
end end
end end
build_settings = { 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 "…"` # Make framework headers discoverable by `import "…"`
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'), 'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(framework_header_search_paths, '-iquote'),
} }
...@@ -113,7 +113,7 @@ module Pod ...@@ -113,7 +113,7 @@ module Pod
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? }
build_settings['FRAMEWORK_SEARCH_PATHS'] = '"$PODS_FRAMEWORK_BUILD_PATH"' build_settings['FRAMEWORK_SEARCH_PATHS'] = '$PODS_FRAMEWORK_BUILD_PATH'
end end
build_settings build_settings
else else
......
...@@ -58,11 +58,9 @@ module Pod ...@@ -58,11 +58,9 @@ module Pod
@xcconfig = Xcodeproj::Config.new(config) @xcconfig = Xcodeproj::Config.new(config)
if target.requires_frameworks? && target.scoped? 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 = { build_settings = {
'PODS_FRAMEWORK_BUILD_PATH' => target.configuration_build_dir, 'PODS_FRAMEWORK_BUILD_PATH' => XCConfigHelper.quote([target.configuration_build_dir]),
'FRAMEWORK_SEARCH_PATHS' => '"$PODS_FRAMEWORK_BUILD_PATH"', 'FRAMEWORK_SEARCH_PATHS' => '$PODS_FRAMEWORK_BUILD_PATH',
'CONFIGURATION_BUILD_DIR' => '$PODS_FRAMEWORK_BUILD_PATH', 'CONFIGURATION_BUILD_DIR' => '$PODS_FRAMEWORK_BUILD_PATH',
} }
@xcconfig.merge!(build_settings) @xcconfig.merge!(build_settings)
......
Subproject commit 3c74dd99cf532ba61336e940f79fb8b02467a65b Subproject commit bfd098b2ee45861951a200f609dbe7d7a1485628
...@@ -189,7 +189,7 @@ module Pod ...@@ -189,7 +189,7 @@ module Pod
end end
it 'sets the PODS_FRAMEWORK_BUILD_PATH build variable' do 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 end
describe 'with a scoped pod target' do describe 'with a scoped pod target' do
...@@ -198,7 +198,7 @@ module Pod ...@@ -198,7 +198,7 @@ module Pod
end end
it 'adds the framework build path to the xcconfig, with quotes, as framework search paths' do 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 end
it 'adds the framework header paths to the xcconfig, with quotes, as local headers' do 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