From a9fec8f638ee53b89b0a3a54c73afa1984650918 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 3 Jul 2024 18:26:00 +0530 Subject: [PATCH] meson: Fix invalid include flag in uninstalled gl pc file ${libdir}/gstreamer-1.0/include is only valid after installation, but extra_cflags are added unconditionally, so we can't use that for include flags. Instead, let's add the include flag via variables, which are different for installed and uninstalled pc files. This is particularly bad for consuming GStreamer via CMake which barfs on non-existent include paths. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build index b97ec0c049..bbc5c8f21c 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build @@ -1113,15 +1113,18 @@ if build_gstgl 'gl_winsys=' + ' '.join(enabled_gl_winsys), 'gl_apis=' + ' '.join(enabled_gl_apis), ] + pkgconfig_installed_variables = [ + 'libinc=-I${libdir}/gstreamer-1.0/include', + ] library_def = {'lib': gstgl} pkg_name = 'gstreamer-gl-1.0' pkgconfig.generate(gstgl, libraries : [gstvideo, gst_base_dep, gst_dep], - variables : pkgconfig_variables + pkgconfig_gl_variables, + variables : pkgconfig_variables + pkgconfig_gl_variables + pkgconfig_installed_variables, uninstalled_variables : pkgconfig_gl_variables, subdirs : pkgconfig_subdirs, - extra_cflags : ['-I${libdir}/gstreamer-1.0/include'], + extra_cflags : ['${libinc}'], name : pkg_name, description : 'Streaming media framework, OpenGL plugins libraries', )