libs: va: make sure va-enumtypes.h is generated before it's used

Need to add a dep for the generated header file to the dependency()
so that it gets generated before anyone tries to #include files
from it (which may happen before the actual lib is built because
that's only needed when stuff is linked together later).

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2057#note_1323236
and CI build failures in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2096

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2103>
This commit is contained in:
Tim-Philipp Müller 2022-04-01 21:09:10 +01:00 committed by GStreamer Marge Bot
parent 0011feb0d6
commit 296094508e

View file

@ -49,6 +49,8 @@ va_enums = gnome.mkenums_simple('va-enumtypes',
body_prefix: '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
install_header: false)
va_enumtypes_h = va_enums[1]
gstva = library('gstva-' + api_version,
va_sources, va_enums,
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_VA', '-DG_LOG_DOMAIN="GStreamer-VA"'],
@ -64,5 +66,7 @@ libraries += [[pkg_name, {'lib': gstva}]]
gstva_dep = declare_dependency(link_with : gstva,
include_directories : [libsinc],
dependencies : [gst_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep])
dependencies : [gst_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep],
sources : [va_enumtypes_h])
meson.override_dependency(pkg_name, gstva_dep)