aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-04-20 18:07:06 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2021-04-21 17:16:01 +0300
commit3f99830f74aa8d32f63eccac02ae5d6f5d9e34ad (patch)
tree48e422e23cc11e4591d5957d955abb787e5d4064
parent8fa7f3a9c32c7fd369069725534cb7cc218affd8 (diff)
downloadmeson-3f99830f74aa8d32f63eccac02ae5d6f5d9e34ad.zip
meson-3f99830f74aa8d32f63eccac02ae5d6f5d9e34ad.tar.gz
meson-3f99830f74aa8d32f63eccac02ae5d6f5d9e34ad.tar.bz2
Xcode: quote some entries as needed.
-rw-r--r--mesonbuild/backend/xcodebackend.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 2a72b19..6fc6692 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -777,7 +777,10 @@ class XCodeBackend(backends.Backend):
path = '"%s"' % t.get_filename()
target_dict.add_item('isa', 'PBXFileReference')
target_dict.add_item('explicitFileType', '"' + typestr + '"')
- target_dict.add_item('path', path)
+ if ' ' in path and path[0] != '"':
+ target_dict.add_item('path', f'"{path}"')
+ else:
+ target_dict.add_item('path', path)
target_dict.add_item('refType', reftype)
target_dict.add_item('sourceTree', 'BUILT_PRODUCTS_DIR')
@@ -1460,7 +1463,10 @@ class XCodeBackend(backends.Backend):
self.add_otherargs(settings_dict, langargs)
settings_dict.add_item('OTHER_LDFLAGS', f'"{ldstr}"')
settings_dict.add_item('OTHER_REZFLAGS', '""')
- settings_dict.add_item('PRODUCT_NAME', product_name)
+ if ' ' in product_name:
+ settings_dict.add_item('PRODUCT_NAME', f'"{product_name}"')
+ else:
+ settings_dict.add_item('PRODUCT_NAME', product_name)
settings_dict.add_item('SECTORDER_FLAGS', '""')
settings_dict.add_item('SYMROOT', f'"{symroot}"')
sysheader_arr = PbxArray()