summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/xcodebackend.py
diff options
context:
space:
mode:
authorAlbert Tang <tangalbert919@yahoo.com>2023-08-12 13:24:05 -0500
committerEli Schwartz <eschwartz93@gmail.com>2023-12-10 22:01:23 -0500
commit1de398a3775063f52b7f287b603a1e3ca9e8fab5 (patch)
treec6f088ae6d097fa1dda399f2435c30592f53d91f /mesonbuild/backend/xcodebackend.py
parent0914f1739b6567551e95ee950dc3bcaa53c61120 (diff)
downloadmeson-1de398a3775063f52b7f287b603a1e3ca9e8fab5.tar.gz
xcode: Wrap custom target output paths in quotes
Without this, any build directory with a space in it was enough to make Xcode fail to open the project due to parsing errors.
Diffstat (limited to 'mesonbuild/backend/xcodebackend.py')
-rw-r--r--mesonbuild/backend/xcodebackend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 5088fe054..e2b8b9985 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -883,7 +883,7 @@ class XCodeBackend(backends.Backend):
custom_dict.add_item('isa', 'PBXFileReference')
custom_dict.add_item('explicitFileType', '"' + typestr + '"')
custom_dict.add_item('name', o)
- custom_dict.add_item('path', os.path.join(self.src_to_build, o))
+ custom_dict.add_item('path', f'"{os.path.join(self.src_to_build, o)}"')
custom_dict.add_item('refType', 0)
custom_dict.add_item('sourceTree', 'SOURCE_ROOT')
objects_dict.add_item(self.custom_target_output_fileref[o], custom_dict)
@@ -1242,7 +1242,7 @@ class XCodeBackend(backends.Backend):
custom_dict.add_item('name', '"Generate {}."'.format(ofilenames[0]))
custom_dict.add_item('outputPaths', outarray)
for o in ofilenames:
- outarray.add_item(os.path.join(self.environment.get_build_dir(), o))
+ outarray.add_item(f'"{os.path.join(self.environment.get_build_dir(), o)}"')
custom_dict.add_item('runOnlyForDeploymentPostprocessing', 0)
custom_dict.add_item('shellPath', '/bin/sh')
workdir = self.environment.get_build_dir()
@@ -1290,7 +1290,7 @@ class XCodeBackend(backends.Backend):
outarray = PbxArray()
gen_dict.add_item('outputPaths', outarray)
for of in ofile_abs:
- outarray.add_item(of)
+ outarray.add_item(f'"{of}"')
for i in infilelist:
# This might be needed to be added to inputPaths. It's not done yet as it is
# unclear whether it is necessary, what actually happens when it is defined