From 3a7eccdaf4fd42bb0a3a889010c6f16353180afc Mon Sep 17 00:00:00 2001
From: Alexandre Janniaux <ajanni@videolabs.io>
Date: Mon, 31 May 2021 10:00:46 +0200
Subject: [PATCH] glinterop_cvpx: add frameworks on tvOS

Otherwise, the OpenGL interop doesn't link on tvOS when creating dynamic
plugins (--enable-shared option from build.sh).
---
 modules/video_output/Makefile.am | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index f8cd60c7d5b8..d4ef92a96781 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -52,10 +52,13 @@ libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,IOSurface,-framework,OpenG
 vout_LTLIBRARIES += libvout_macosx_plugin.la libcaopengllayer_plugin.la \
 	libglinterop_cvpx_plugin.la
 endif
-if HAVE_IOS
+
+if HAVE_DARWIN
+if !HAVE_OSX
 libglinterop_cvpx_plugin_la_CPPFLAGS += -DUSE_OPENGL_ES2
 libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,IOSurface,-framework,OpenGLES
 endif
+endif
 
 libvout_ios_plugin_la_SOURCES = video_output/opengl/display.c
 libvout_ios_plugin_la_CFLAGS = $(AM_CFLAGS) $(OPENGL_COMMONCFLAGS) -DUSE_OPENGL_ES2
-- 
GitLab