diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-11-20 14:11:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 14:11:13 +0100 |
commit | a2a5793e1324f97e495ccb835a8fd5003354ec29 (patch) | |
tree | aaf908a586e8025dab6a39eb631037fba275baa5 /platform/osx/detect.py | |
parent | 7651b857822b2f47750c4ecce066472024e20f8e (diff) | |
parent | 362464463015fa4e6690e5733fa3ee0be11fa32f (diff) | |
download | redot-engine-a2a5793e1324f97e495ccb835a8fd5003354ec29.tar.gz |
Merge pull request #21339 from Placinta/master
Fix regular macOS build by passing -isysroot to compiler so correct system headers are found
Diffstat (limited to 'platform/osx/detect.py')
-rw-r--r-- | platform/osx/detect.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py index c5bd64b15c..051836b66d 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -1,5 +1,6 @@ import os import sys +from methods import detect_darwin_sdk_path def is_active(): @@ -23,6 +24,7 @@ def get_opts(): return [ ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'), + ('MACOS_SDK_PATH', 'Path to the macOS SDK', ''), EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')), BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False), ] @@ -84,6 +86,10 @@ def configure(env): env['AS'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as" env.Append(CCFLAGS=['-D__MACPORTS__']) #hack to fix libvpx MM256_BROADCASTSI128_SI256 define + detect_darwin_sdk_path('osx', env) + env.Append(CPPFLAGS=['-isysroot', '$MACOS_SDK_PATH']) + env.Append(LINKFLAGS=['-isysroot', '$MACOS_SDK_PATH']) + else: # osxcross build root = os.environ.get("OSXCROSS_ROOT", 0) basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-" |