gst-full: Add missing include directories to use it in subprojects

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/203>
This commit is contained in:
Xavier Claessens 2020-07-24 11:15:44 -04:00 committed by Stéphane Cerveau
parent b4256c219d
commit 8a9d21ce18

View file

@ -267,26 +267,32 @@ if get_option('default_library') == 'static'
endif endif
gst_dep = subproject('gstreamer').get_variable('gst_dep')
# Get a list of libraries that needs to be exposed in the ABI. # Get a list of libraries that needs to be exposed in the ABI.
exposed_libs = [] exposed_libs = []
incdir_deps = []
foreach name : get_option('gst-full-libraries') + ['gstreamer'] foreach name : get_option('gst-full-libraries') + ['gstreamer']
info = libraries_map[name] info = libraries_map[name]
exposed_libs += subproject(info[0]).get_variable(info[1]) exposed_libs += subproject(info[0]).get_variable(info[1])
depname = name == 'gstreamer' ? 'gstreamer-1.0' : 'gstreamer-@0@-1.0'.format(name)
incdir_deps += dependency(depname).partial_dependency(includes: true)
endforeach endforeach
# glib and gobject are part of our public API. If we are using glib from the # glib and gobject are part of our public API. If we are using glib from the
# system then our pkg-config file must require it. If we built it as # system then our pkg-config file must require it. If we built it as
# subproject then we need to link_whole it. # subproject then we need to link_whole it.
requires = [] glib_deps = []
gobject_dep = dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep']) glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
if gobject_dep.type_name() == 'internal' if gobject_dep.type_name() == 'internal'
glib_subproject = subproject('glib') glib_subproject = subproject('glib')
exposed_libs += glib_subproject.get_variable('libglib') exposed_libs += glib_subproject.get_variable('libglib')
exposed_libs += glib_subproject.get_variable('libgobject') exposed_libs += glib_subproject.get_variable('libgobject')
incdir_deps += [
glib_dep.partial_dependency(includes: true),
gobject_dep.partial_dependency(includes: true),
]
else else
requires = ['glib-2.0', 'gobject-2.0'] glib_deps = [glib_dep, gobject_dep]
endif endif
link_deps = [] link_deps = []
@ -307,17 +313,17 @@ if get_option('default_library') == 'static'
link_with : all_plugins, link_with : all_plugins,
link_args: gstfull_link_args, link_args: gstfull_link_args,
link_whole : exposed_libs, link_whole : exposed_libs,
dependencies : gst_dep, dependencies : incdir_deps + glib_deps,
link_depends : link_deps, link_depends : link_deps,
install : true, install : true,
) )
gst_full_dep = declare_dependency(link_with: gstfull.get_shared_lib(), gst_full_dep = declare_dependency(link_with: gstfull.get_shared_lib(),
dependencies : gst_dep, dependencies : incdir_deps + glib_deps,
include_directories: include_directories('.') include_directories: include_directories('.')
) )
pkgconfig.generate(gstfull, pkgconfig.generate(gstfull,
requires: requires, requires: glib_deps,
subdirs : 'gstreamer-1.0') subdirs : 'gstreamer-1.0')
meson.override_dependency('gstreamer-full-1.0', gst_full_dep) meson.override_dependency('gstreamer-full-1.0', gst_full_dep)
endif endif