ios: fix recent issue with Xcode, our SDKROOT variable is now conflicting with clang

This commit is contained in:
Mathieu Virbel 2013-02-11 21:25:20 +01:00
parent 1a7015d956
commit 513aca050e
1 changed files with 3 additions and 1 deletions

View File

@ -186,7 +186,9 @@ def determine_base_flags():
'extra_link_args': [],
'extra_compile_args': []}
if c_options['use_ios']:
sysroot = environ['SDKROOT']
sysroot = environ.get('IOSSDKROOT', environ.get('SDKROOT'))
if not sysroot:
raise Exception('IOSSDKROOT is not set')
flags['include_dirs'] += [sysroot]
flags['extra_compile_args'] += ['-isysroot', sysroot]
flags['extra_link_args'] += ['-isysroot', sysroot]