build script: use local macos sdk when found

This commit is contained in:
alexey.lysiuk 2020-11-30 11:32:06 +02:00
parent 446de1778e
commit fb9a8b80be
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
/.idea/
/build/
/prefix/
/sdk/
/deps/*/share
/deps/**/*.la

View file

@ -799,6 +799,11 @@ class Builder(object):
self.jobs = arguments.jobs and arguments.jobs or \
subprocess.check_output(['sysctl', '-n', 'hw.ncpu']).decode('ascii').strip()
if not self.sdk_path:
sdk_probe_path = f'{self.root_path}sdk{os.sep}MacOSX{self.os_version}.sdk'
if os.path.exists(sdk_probe_path):
self.sdk_path = sdk_probe_path
self.target.initialize(self)
def run(self):