@@ -738,7 +738,10 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
738
738
self .parse_modules (kwargs )
739
739
740
740
for_machine = MachineChoice .BUILD if kwargs .get ('native' , False ) else MachineChoice .HOST
741
- if environment .machines [for_machine ].is_darwin () and self .check_macOS_recent_enough ():
741
+ if (
742
+ (environment .machines [for_machine ].system == 'darwin' and self .check_macOS_recent_enough ())
743
+ or (environment .machines [for_machine ].system == 'ios' and self .check_iOS_recent_enough ())
744
+ ):
742
745
self .detect (kwargs )
743
746
744
747
def check_macOS_recent_enough (self ) -> bool :
@@ -752,6 +755,18 @@ def check_macOS_recent_enough(self) -> bool:
752
755
sdk_version = subprocess .run (cmd , capture_output = True , check = True , text = True ).stdout .strip ()
753
756
return mesonlib .version_compare (sdk_version , '>=13.3' )
754
757
758
+ def check_iOS_recent_enough (self ) -> bool :
759
+ ios_version = platform .ios_ver ().system
760
+ deploy_target = os .environ .get ('IPHONEOS_DEPLOYMENT_TARGET' , ios_version )
761
+ if not mesonlib .version_compare (deploy_target , '>=16.4' ):
762
+ return False
763
+
764
+ # We also need the SDK to be >=16.4
765
+ sdk = "iphonesimulator" if platform .ios_ver ().is_simulator else "iphoneos"
766
+ cmd = ['xcrun' , '-sdk' , sdk , '--show-sdk-version' ]
767
+ sdk_version = subprocess .run (cmd , capture_output = True , check = True , text = True ).stdout .strip ()
768
+ return mesonlib .version_compare (sdk_version , '>=16.4' )
769
+
755
770
def detect (self , kwargs : T .Dict [str , T .Any ]) -> None :
756
771
from .framework import ExtraFrameworkDependency
757
772
dep = ExtraFrameworkDependency ('Accelerate' , self .env , kwargs )
0 commit comments