aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/xcodebackend.py
diff options
context:
space:
mode:
authorAlbert Tang <tangalbert919@yahoo.com>2023-09-22 09:53:18 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2024-06-03 20:06:57 +0300
commitda20ea01ca257987216b0798966070fecc40bfc9 (patch)
tree6c7b0f973d336b5416ff46b13efbf4a20829ad79 /mesonbuild/backend/xcodebackend.py
parent8499e4535b196c0497fbae92b59350dd8824d347 (diff)
downloadmeson-da20ea01ca257987216b0798966070fecc40bfc9.zip
meson-da20ea01ca257987216b0798966070fecc40bfc9.tar.gz
meson-da20ea01ca257987216b0798966070fecc40bfc9.tar.bz2
xcode: Generate files for highest detected version
Some settings require "objectVersion" to be set to a certain value or Xcode will not use it. To fix this, we set it to the highest possible value, determined by the detected version of Xcode. We also set "compatibilityVersion", but mainly so it lines up with "objectVersion". At the same time, we should not be generating Xcode 3.2-compatible projects by default anyway.
Diffstat (limited to 'mesonbuild/backend/xcodebackend.py')
-rw-r--r--mesonbuild/backend/xcodebackend.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 629a222..f1b5c51 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -1271,7 +1271,7 @@ class XCodeBackend(backends.Backend):
project_dict.add_item('buildStyles', style_arr)
for name, idval in self.buildstylemap.items():
style_arr.add_item(idval, name)
- project_dict.add_item('compatibilityVersion', '"Xcode 3.2"')
+ project_dict.add_item('compatibilityVersion', f'"{self.xcodeversion}"')
project_dict.add_item('hasScannedForEncodings', 0)
project_dict.add_item('mainGroup', self.maingroup_id)
project_dict.add_item('projectDirPath', '"' + self.environment.get_source_dir() + '"')
@@ -1870,7 +1870,7 @@ class XCodeBackend(backends.Backend):
def generate_prefix(self, pbxdict: PbxDict) -> PbxDict:
pbxdict.add_item('archiveVersion', '1')
pbxdict.add_item('classes', PbxDict())
- pbxdict.add_item('objectVersion', '46')
+ pbxdict.add_item('objectVersion', self.objversion)
objects_dict = PbxDict()
pbxdict.add_item('objects', objects_dict)