From fb9a8b80be1ab61a2d7c9e07ff9b66efb6f22567 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 30 Nov 2020 11:32:06 +0200 Subject: [PATCH] build script: use local macos sdk when found --- .gitignore | 1 + build.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 136c07fc..2238313b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /.idea/ /build/ /prefix/ +/sdk/ /deps/*/share /deps/**/*.la diff --git a/build.py b/build.py index 27a24b32..0d077434 100755 --- a/build.py +++ b/build.py @@ -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):