Merge pull request #478 from colugomusic/osx-deployment-target

Add macos_deployment_target SConstruct option.
pull/500/head
Marc 2021-01-31 19:56:35 +00:00 committed by GitHub
commit 8300c53490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -134,6 +134,11 @@ opts.Add(EnumVariable(
'armv7', 'armv7',
['armv7','arm64v8','x86','x86_64'] ['armv7','arm64v8','x86','x86_64']
)) ))
opts.Add(
'macos_deployment_target',
'macOS deployment target',
'default'
)
opts.Add(EnumVariable( opts.Add(EnumVariable(
'ios_arch', 'ios_arch',
'Target iOS architecture', 'Target iOS architecture',
@ -204,6 +209,10 @@ elif env['platform'] == 'osx':
) )
env.Append(CCFLAGS=['-std=c++14', '-arch', 'x86_64']) env.Append(CCFLAGS=['-std=c++14', '-arch', 'x86_64'])
if env['macos_deployment_target'] != 'default':
env.Append(CCFLAGS=['-mmacosx-version-min=' + env['macos_deployment_target']])
env.Append(LINKFLAGS=[ env.Append(LINKFLAGS=[
'-arch', '-arch',
'x86_64', 'x86_64',