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/iphone/detect.py | |
parent | 7651b857822b2f47750c4ecce066472024e20f8e (diff) | |
parent | 362464463015fa4e6690e5733fa3ee0be11fa32f (diff) |
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/iphone/detect.py')
-rw-r--r-- | platform/iphone/detect.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 417571f6f3..c9f37931b0 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -1,7 +1,7 @@ import os import string import sys - +from methods import detect_darwin_sdk_path def is_active(): return True @@ -22,9 +22,8 @@ def can_build(): def get_opts(): from SCons.Variables import BoolVariable return [ - ('IPHONEPLATFORM', 'Name of the iPhone platform', 'iPhoneOS'), ('IPHONEPATH', 'Path to iPhone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'), - ('IPHONESDK', 'Path to the iPhone SDK', '/Applications/Xcode.app/Contents/Developer/Platforms/${IPHONEPLATFORM}.platform/Developer/SDKs/${IPHONEPLATFORM}.sdk/'), + ('IPHONESDK', 'Path to the iPhone SDK', ''), BoolVariable('game_center', 'Support for game center', True), BoolVariable('store_kit', 'Support for in-app store', True), BoolVariable('icloud', 'Support for iCloud', True), @@ -103,13 +102,15 @@ def configure(env): ## Compile flags if (env["arch"] == "x86" or env["arch"] == "x86_64"): - env['IPHONEPLATFORM'] = 'iPhoneSimulator' + detect_darwin_sdk_path('iphonesimulator', env) env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = '10.9' arch_flag = "i386" if env["arch"] == "x86" else env["arch"] env.Append(CCFLAGS=('-arch ' + arch_flag + ' -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks -fasm-blocks -isysroot $IPHONESDK -mios-simulator-version-min=9.0 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"').split()) elif (env["arch"] == "arm"): + detect_darwin_sdk_path('iphone', env) env.Append(CCFLAGS='-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies'.split()) elif (env["arch"] == "arm64"): + detect_darwin_sdk_path('iphone', env) env.Append(CCFLAGS='-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK'.split()) env.Append(CPPFLAGS=['-DNEED_LONG_INT']) env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON']) |