From 95ca78b63e3a25b3ed3135fd5055ca77664f8faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Fri, 27 Sep 2019 18:08:42 +0300 Subject: [PATCH] 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. --- wscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 752b400dc3..312da2ef30 100644 --- a/wscript +++ b/wscript @@ -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',