[macOS] Fixed a problem sdk path could not be detected
This commit is contained in:
parent
8348aca118
commit
577e547b6a
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import glob
|
||||||
import string
|
import string
|
||||||
import datetime
|
import datetime
|
||||||
import subprocess
|
import subprocess
|
||||||
from compat import iteritems, isbasestring
|
from compat import iteritems, isbasestring, decode_utf8
|
||||||
|
|
||||||
|
|
||||||
def add_source_files(self, sources, filetype, lib_env=None, shared=False):
|
def add_source_files(self, sources, filetype, lib_env=None, shared=False):
|
||||||
|
@ -645,7 +645,7 @@ def detect_darwin_sdk_path(platform, env):
|
||||||
|
|
||||||
if not env[var_name]:
|
if not env[var_name]:
|
||||||
try:
|
try:
|
||||||
sdk_path = subprocess.check_output(['xcrun', '--sdk', sdk_name, '--show-sdk-path']).strip()
|
sdk_path = decode_utf8(subprocess.check_output(['xcrun', '--sdk', sdk_name, '--show-sdk-path']).strip())
|
||||||
if sdk_path:
|
if sdk_path:
|
||||||
env[var_name] = sdk_path
|
env[var_name] = sdk_path
|
||||||
except (subprocess.CalledProcessError, OSError) as e:
|
except (subprocess.CalledProcessError, OSError) as e:
|
||||||
|
|
Loading…
Reference in a new issue