ctx.msg('Checking for Accelerate framework', 'no (disabled)',
color = 'YELLOW')
- if target_platform in [ 'ios', 'iosimulator', 'watchos', 'watchsimulator' ]:
+ if target_platform in [ 'ios', 'iosimulator', 'watchos', 'watchsimulator',
+ 'tvos', 'tvsimulator' ]:
if target_platform in ['ios', 'iosimulator']:
MINSDKVER="16.4"
elif target_platform in ['watchos', 'watchsimulator']:
MINSDKVER="8.0"
+ elif target_platform in ['tvos', 'tvsimulator']:
+ MINSDKVER="9.0"
xcodeslct_output = subprocess.check_output (['xcode-select', '--print-path'])
XCODEPATH = xcodeslct_output.decode(sys.stdout.encoding).strip()
if target_platform == 'ios':
SDKNAME = "WatchOS"
elif target_platform == 'watchsimulator':
SDKNAME = "WatchSimulator"
+ elif target_platform == 'tvos':
+ SDKNAME = "AppleTVOS"
+ elif target_platform == 'tvsimulator':
+ SDKNAME = "AppleTVSimulator"
else:
raise ctx.errors.ConfigurationError ("Error: unknown target platform '"
+ target_platform + "'")
ctx.env.LINKFLAGS += ['-arch', 'arm64']
ctx.env.CFLAGS += [ '-mwatchsimulator-version-min=' + MINSDKVER ]
ctx.env.LINKFLAGS += [ '-mwatchsimulator-version-min=' + MINSDKVER ]
+ elif target_platform == 'tvos':
+ ctx.env.CFLAGS += [ '-arch', 'arm64' ]
+ ctx.env.CFLAGS += [ '-arch', 'arm64e' ]
+ ctx.env.LINKFLAGS += ['-arch', 'arm64']
+ ctx.env.LINKFLAGS += ['-arch', 'arm64e']
+ ctx.env.CFLAGS += [ '-mtvos-version-min=' + MINSDKVER ]
+ ctx.env.LINKFLAGS += [ '-mtvos-version-min=' + MINSDKVER ]
+ elif target_platform == 'tvsimulator':
+ ctx.env.CFLAGS += [ '-arch', 'x86_64' ]
+ ctx.env.CFLAGS += [ '-arch', 'arm64' ]
+ ctx.env.LINKFLAGS += ['-arch', 'x86_64']
+ ctx.env.LINKFLAGS += ['-arch', 'arm64']
+ ctx.env.CFLAGS += [ '-mtvos-simulator-version-min=' + MINSDKVER ]
+ ctx.env.LINKFLAGS += [ '-mtvos-simulator-version-min=' + MINSDKVER ]
ctx.env.CFLAGS += [ '-isysroot' , SDKROOT]
ctx.env.LINKFLAGS += [ '-isysroot' , SDKROOT]
bld.recurse('src')
# add sub directories
- if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'watchos', 'watchsimulator', 'android']:
+ if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'watchos', 'watchsimulator',
+ 'tvos', 'tvsimulator', 'android']:
if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd:
bld.options.testcmd = 'node %s'
if bld.options.enable_examples: