qmlglsink: can not be properly compiled with sysroot using meson
I run meson on gst-plugins-good with such environment variables:
DESTDIR = /home/vavooon/build/ubuntu-base-19.10-base-amd64-root PKG_CONFIG_SYSROOT_DIR = /home/vavooon/build/ubuntu-base-19.10-base-amd64-root PKG_CONFIG_LIBDIR = /home/vavooon/build/ubuntu-base-19.10-base-amd64-root/usr/lib/x86_64-linux-gnu/pkgconfig CFLAGS, CXXFLAGS, LDFLAGS = --sysroot=/home/vavooon/build/ubuntu-base-19.10-base-amd64-root
so meson is able to properly recognize all dependencies and compile/link against them.
E.g. here in
qt5core_dep = dependency('Qt5Core', required: false)
If you print qt5core_dep.compile_args you'll see that it returns full path including sysroot:
But here in
qt_include_dir = qt5core_dep.get_pkgconfig_variable('includedir')
If you inspect this one you'll see path only relative to sysroot
So far I've prefixed it with my sysroot path for successful compilation but it looks it should be like:
qt_include_dir = get_option('pkgconfig-sysroot-path') + qt5core_dep.get_pkgconfig_variable('includedir')
I quickly searched in entire GStreamer repo and looks like there is couple of places with same behavior.