wscript: check tvOS define's value to be nonzero

TARGET_OS_TV seems to always be defined, but set according to the
build configuration. This fixes all Apple configurations being
mis-identified as tvOS.
This commit is contained in:
Jan Ekström 2019-09-27 18:08:42 +03:00
parent 643417dd17
commit 95ca78b63e
1 changed files with 4 additions and 1 deletions

View File

@ -158,7 +158,10 @@ main_dependencies = [
}, {
'name': '--tvos',
'desc': 'tvOS environment',
'func': check_statement('TargetConditionals.h', 'int x = TARGET_OS_TV;'),
'func': check_statement(
['TargetConditionals.h', 'assert.h'],
'static_assert(TARGET_OS_TV, "TARGET_OS_TV defined to zero!")'
),
}, {
'name': '--egl-android',
'desc': 'Android EGL support',