Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode backend: better quoting for spaces in HEADER_SEARCH_PATHS #13867

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mesonbuild/backend/xcodebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,11 @@ def generate_single_build_target(self, objects_dict, target_name, target) -> Non
i = os.path.normpath(i)
unquoted_headers.append(i)
for i in unquoted_headers:
header_arr.add_item(f'"{i}"')
if ' ' in i:
# Make sure Xcode will not split single path into separate entries, escaping just space won't help
header_arr.add_item(f'"\\\"{i}\\\""')
else:
header_arr.add_item(f'"{i}"')
settings_dict.add_item('HEADER_SEARCH_PATHS', header_arr)
settings_dict.add_item('INSTALL_PATH', install_path)
settings_dict.add_item('LIBRARY_SEARCH_PATHS', '')
Expand Down
Loading