mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
Meson: Use pkg-config generator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4>
This commit is contained in:
parent
74dc8f7678
commit
4095a4b4c5
17 changed files with 60 additions and 214 deletions
|
@ -250,6 +250,14 @@ libgst = library('gstreamer-1.0', gst_sources,
|
||||||
+ platform_deps,
|
+ platform_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(libgst,
|
||||||
|
libraries : [glib_dep, gobject_dep],
|
||||||
|
variables : pkgconfig_variables,
|
||||||
|
subdirs : pkgconfig_subdirs,
|
||||||
|
name : 'gstreamer-1.0',
|
||||||
|
description : 'Streaming media framework',
|
||||||
|
)
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h']
|
gst_gir_extra_args = gir_init_section + ['--c-include=gst/gst.h']
|
||||||
if meson.is_subproject()
|
if meson.is_subproject()
|
||||||
|
@ -288,3 +296,5 @@ gst_dep = declare_dependency(link_with : libgst,
|
||||||
# Everything that uses libgst needs this built to compile
|
# Everything that uses libgst needs this built to compile
|
||||||
sources : gst_gen_sources,
|
sources : gst_gen_sources,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
meson.override_dependency('gstreamer-1.0', gst_dep)
|
||||||
|
|
|
@ -51,6 +51,14 @@ gst_base = library('gstbase-@0@'.format(apiversion),
|
||||||
dependencies : [gobject_dep, glib_dep, gst_dep],
|
dependencies : [gobject_dep, glib_dep, gst_dep],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(gst_base,
|
||||||
|
libraries : [libgst],
|
||||||
|
variables : pkgconfig_variables,
|
||||||
|
subdirs : pkgconfig_subdirs,
|
||||||
|
name : 'gstreamer-base-1.0',
|
||||||
|
description : 'Base classes for GStreamer elements',
|
||||||
|
)
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/base/base.h' ]
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/base/base.h' ]
|
||||||
gst_base_gir = gnome.generate_gir(gst_base,
|
gst_base_gir = gnome.generate_gir(gst_base,
|
||||||
|
@ -75,6 +83,8 @@ gst_base_dep = declare_dependency(link_with : gst_base,
|
||||||
dependencies : [gst_dep],
|
dependencies : [gst_dep],
|
||||||
sources : gst_base_gen_sources)
|
sources : gst_base_gen_sources)
|
||||||
|
|
||||||
|
meson.override_dependency('gstreamer-base-1.0', gst_base_dep)
|
||||||
|
|
||||||
install_headers('base.h',
|
install_headers('base.h',
|
||||||
'base-prelude.h',
|
'base-prelude.h',
|
||||||
'gstadapter.h',
|
'gstadapter.h',
|
||||||
|
|
|
@ -48,6 +48,14 @@ gst_check = library('gstcheck-@0@'.format(apiversion),
|
||||||
dependencies : [gobject_dep, glib_dep, gst_dep],
|
dependencies : [gobject_dep, glib_dep, gst_dep],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(gst_check,
|
||||||
|
libraries : [libgst],
|
||||||
|
variables : pkgconfig_variables,
|
||||||
|
subdirs : pkgconfig_subdirs,
|
||||||
|
name : 'gstreamer-check-1.0',
|
||||||
|
description : 'Unit testing helper library for GStreamer modules',
|
||||||
|
)
|
||||||
|
|
||||||
gst_check_gen_sources = []
|
gst_check_gen_sources = []
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
|
@ -72,3 +80,5 @@ gst_check_dep = declare_dependency(link_with : gst_check,
|
||||||
include_directories : [libsinc],
|
include_directories : [libsinc],
|
||||||
dependencies : [gst_dep],
|
dependencies : [gst_dep],
|
||||||
sources : gst_check_gen_sources)
|
sources : gst_check_gen_sources)
|
||||||
|
|
||||||
|
meson.override_dependency('gstreamer-check-1.0', gst_check_dep)
|
||||||
|
|
|
@ -48,6 +48,14 @@ gst_controller = library('gstcontroller-@0@'.format(apiversion),
|
||||||
dependencies : [gobject_dep, glib_dep, mathlib, gst_dep],
|
dependencies : [gobject_dep, glib_dep, mathlib, gst_dep],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(gst_controller,
|
||||||
|
libraries : [libgst],
|
||||||
|
variables : pkgconfig_variables,
|
||||||
|
subdirs : pkgconfig_subdirs,
|
||||||
|
name : 'gstreamer-controller-1.0',
|
||||||
|
description : 'Dynamic parameter control for GStreamer elements',
|
||||||
|
)
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ]
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/controller/controller.h' ]
|
||||||
gst_controller_gir = gnome.generate_gir(gst_controller,
|
gst_controller_gir = gnome.generate_gir(gst_controller,
|
||||||
|
@ -70,3 +78,5 @@ gst_controller_dep = declare_dependency(link_with : gst_controller,
|
||||||
include_directories : [libsinc],
|
include_directories : [libsinc],
|
||||||
sources: gst_controller_gen_sources,
|
sources: gst_controller_gen_sources,
|
||||||
dependencies : [gst_dep])
|
dependencies : [gst_dep])
|
||||||
|
|
||||||
|
meson.override_dependency('gstreamer-controller-1.0', gst_controller_dep)
|
||||||
|
|
|
@ -35,6 +35,14 @@ gst_net = library('gstnet-@0@'.format(apiversion),
|
||||||
dependencies : [gio_dep, gst_base_dep],
|
dependencies : [gio_dep, gst_base_dep],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(gst_net,
|
||||||
|
libraries : [libgst],
|
||||||
|
variables : pkgconfig_variables,
|
||||||
|
subdirs : pkgconfig_subdirs,
|
||||||
|
name : 'gstreamer-net-1.0',
|
||||||
|
description : 'Network-enabled GStreamer plug-ins and clocking',
|
||||||
|
)
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/net/net.h' ]
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/net/net.h' ]
|
||||||
gst_net_gir = gnome.generate_gir(gst_net,
|
gst_net_gir = gnome.generate_gir(gst_net,
|
||||||
|
@ -57,3 +65,5 @@ gst_net_dep = declare_dependency(link_with : gst_net,
|
||||||
include_directories : [libsinc],
|
include_directories : [libsinc],
|
||||||
sources: gst_net_gen_sources,
|
sources: gst_net_gen_sources,
|
||||||
dependencies : [gst_base_dep])
|
dependencies : [gst_base_dep])
|
||||||
|
|
||||||
|
meson.override_dependency('gstreamer-net-1.0', gst_net_dep)
|
||||||
|
|
11
meson.build
11
meson.build
|
@ -563,6 +563,16 @@ if get_option('default_library') == 'shared'
|
||||||
# If we don't build static plugins there is no need to generate pc files
|
# If we don't build static plugins there is no need to generate pc files
|
||||||
plugins_pkgconfig_install_dir = disabler()
|
plugins_pkgconfig_install_dir = disabler()
|
||||||
endif
|
endif
|
||||||
|
pkgconfig_variables = ['exec_prefix=${prefix}',
|
||||||
|
'toolsdir=${exec_prefix}/bin',
|
||||||
|
'pluginsdir=${libdir}/gstreamer-1.0',
|
||||||
|
'datarootdir=${prefix}/share',
|
||||||
|
'datadir=${datarootdir}',
|
||||||
|
'girdir=${datadir}/gir-1.0',
|
||||||
|
'typelibdir=${libdir}/girepository-1.0',
|
||||||
|
'libexecdir=${prefix}/libexec',
|
||||||
|
'pluginscannerdir=${libexecdir}/gstreamer-1.0']
|
||||||
|
pkgconfig_subdirs = ['gstreamer-1.0']
|
||||||
|
|
||||||
subdir('gst')
|
subdir('gst')
|
||||||
subdir('libs')
|
subdir('libs')
|
||||||
|
@ -570,7 +580,6 @@ subdir('plugins')
|
||||||
if not get_option('tools').disabled()
|
if not get_option('tools').disabled()
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
endif
|
endif
|
||||||
subdir('pkgconfig')
|
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('docs')
|
subdir('docs')
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# the standard variables don't make sense for an uninstalled copy
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=@baselibdir@
|
|
||||||
includedir=
|
|
||||||
girdir=@abs_top_builddir@/libs/gst/base
|
|
||||||
typelibdir=@abs_top_builddir@/libs/gst/base
|
|
||||||
|
|
||||||
Name: GStreamer base classes, uninstalled
|
|
||||||
Description: Base classes for GStreamer elements, Not Installed
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@ = @VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
|
|
||||||
Libs: -L${libdir} -lgstbase-@GST_API_VERSION@
|
|
||||||
Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs
|
|
|
@ -1,15 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/gstreamer-@GST_API_VERSION@
|
|
||||||
datarootdir=${prefix}/share
|
|
||||||
datadir=${datarootdir}
|
|
||||||
girdir=${datadir}/gir-1.0
|
|
||||||
typelibdir=${libdir}/girepository-1.0
|
|
||||||
|
|
||||||
Name: GStreamer base classes
|
|
||||||
Description: Base classes for GStreamer elements
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lgstbase-@GST_API_VERSION@
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,15 +0,0 @@
|
||||||
# the standard variables don't make sense for an uninstalled copy
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=@checklibdir@
|
|
||||||
includedir=
|
|
||||||
girdir=@abs_top_builddir@/libs/gst/check
|
|
||||||
typelibdir=@abs_top_builddir@/libs/gst/check
|
|
||||||
|
|
||||||
Name: GStreamer check unit testing, uninstalled
|
|
||||||
Description: Unit testing helper library for GStreamer modules, Not Installed
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@ = @VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
|
|
||||||
Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@
|
|
||||||
Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs
|
|
|
@ -1,15 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/gstreamer-@GST_API_VERSION@
|
|
||||||
datarootdir=${prefix}/share
|
|
||||||
datadir=${datarootdir}
|
|
||||||
girdir=${datadir}/gir-1.0
|
|
||||||
typelibdir=${libdir}/girepository-1.0
|
|
||||||
|
|
||||||
Name: GStreamer check unit testing
|
|
||||||
Description: Unit testing helper library for GStreamer modules
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,15 +0,0 @@
|
||||||
# the standard variables don't make sense for an uninstalled copy
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=@controllerlibdir@
|
|
||||||
includedir=
|
|
||||||
girdir=@abs_top_builddir@/libs/gst/controller
|
|
||||||
typelibdir=@abs_top_builddir@/libs/gst/controller
|
|
||||||
|
|
||||||
Name: GStreamer controller, uninstalled
|
|
||||||
Description: Dynamic parameter control for GStreamer elements, Not Installed
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@ = @VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
|
|
||||||
Libs: -L${libdir} -lgstcontroller-@GST_API_VERSION@
|
|
||||||
Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs
|
|
|
@ -1,15 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/gstreamer-@GST_API_VERSION@
|
|
||||||
datarootdir=${prefix}/share
|
|
||||||
datadir=${datarootdir}
|
|
||||||
girdir=${datadir}/gir-1.0
|
|
||||||
typelibdir=${libdir}/girepository-1.0
|
|
||||||
|
|
||||||
Name: GStreamer controller
|
|
||||||
Description: Dynamic parameter control for GStreamer elements
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lgstcontroller-@GST_API_VERSION@
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,15 +0,0 @@
|
||||||
# the standard variables don't make sense for an uninstalled copy
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=@netlibdir@
|
|
||||||
includedir=
|
|
||||||
girdir=@abs_top_builddir@/libs/gst/net
|
|
||||||
typelibdir=@abs_top_builddir@/libs/gst/net
|
|
||||||
|
|
||||||
Name: GStreamer networking library, uninstalled
|
|
||||||
Description: Network-enabled GStreamer plug-ins and clocking, uninstalled
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ gio-2.0
|
|
||||||
Version: @VERSION@
|
|
||||||
|
|
||||||
Libs: -L${libdir} -lgstnet-@GST_API_VERSION@
|
|
||||||
Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs
|
|
|
@ -1,15 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/gstreamer-@GST_API_VERSION@
|
|
||||||
datarootdir=${prefix}/share
|
|
||||||
datadir=${datarootdir}
|
|
||||||
girdir=${datadir}/gir-1.0
|
|
||||||
typelibdir=${libdir}/girepository-1.0
|
|
||||||
|
|
||||||
Name: GStreamer networking library
|
|
||||||
Description: Network-enabled GStreamer plug-ins and clocking
|
|
||||||
Requires: gstreamer-@GST_API_VERSION@ gio-2.0
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lgstnet-@GST_API_VERSION@
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,21 +0,0 @@
|
||||||
# the standard variables don't make sense for an uninstalled copy
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=@gstlibdir@
|
|
||||||
# includedir is builddir because it is used to find gstconfig.h in places
|
|
||||||
includedir=@abs_top_builddir@
|
|
||||||
toolsdir=@abs_top_builddir@/tools
|
|
||||||
pluginsdir=@abs_top_builddir@/plugins
|
|
||||||
girdir=@abs_top_builddir@/gst
|
|
||||||
bashhelpersdir=@abs_top_builddir@/data/bash-completion/helpers
|
|
||||||
helpersdir=@abs_top_builddir@/libs/gst/helpers
|
|
||||||
typelibdir=@abs_top_builddir@/gst
|
|
||||||
pluginscannerdir=${helpersdir}
|
|
||||||
|
|
||||||
Name: GStreamer Uninstalled
|
|
||||||
Description: Streaming media framework, Not Installed
|
|
||||||
Version: @VERSION@
|
|
||||||
Requires: glib-2.0, gobject-2.0
|
|
||||||
Requires.private: gmodule-no-export-2.0 @UNWIND_REQUIRE@ @DW_REQUIRE@
|
|
||||||
Libs: -L${libdir} -lgstreamer-@GST_API_VERSION@
|
|
||||||
Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/libs -I@abs_top_builddir@ -I@abs_top_builddir@/libs
|
|
|
@ -1,20 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libexecdir=@libexecdir@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/gstreamer-@GST_API_VERSION@
|
|
||||||
toolsdir=${exec_prefix}/bin
|
|
||||||
pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@
|
|
||||||
datarootdir=${prefix}/share
|
|
||||||
datadir=${datarootdir}
|
|
||||||
girdir=${datadir}/gir-1.0
|
|
||||||
typelibdir=${libdir}/girepository-1.0
|
|
||||||
pluginscannerdir=${libexecdir}/gstreamer-1.0
|
|
||||||
|
|
||||||
Name: GStreamer
|
|
||||||
Description: Streaming media framework
|
|
||||||
Version: @VERSION@
|
|
||||||
Requires: glib-2.0, gobject-2.0
|
|
||||||
Requires.private: gmodule-no-export-2.0 @UNWIND_REQUIRE@ @DW_REQUIRE@
|
|
||||||
Libs: -L${libdir} -lgstreamer-@GST_API_VERSION@
|
|
||||||
Cflags: -I${includedir}
|
|
|
@ -1,52 +0,0 @@
|
||||||
pkgconf = configuration_data()
|
|
||||||
|
|
||||||
pkgconf.set('prefix', join_paths(get_option('prefix')))
|
|
||||||
pkgconf.set('exec_prefix', '${prefix}')
|
|
||||||
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
|
|
||||||
pkgconf.set('libexecdir', '${prefix}/@0@'.format(get_option('libexecdir')))
|
|
||||||
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
|
|
||||||
pkgconf.set('GST_API_VERSION', apiversion)
|
|
||||||
pkgconf.set('VERSION', gst_version)
|
|
||||||
pkgconf.set('LIBM', mathlib.found() ? '-lm' : '')
|
|
||||||
pkgconf.set('LIBRT', rt_lib.found() ? '-lrt' : '')
|
|
||||||
|
|
||||||
# Requires.private
|
|
||||||
pkgconf.set('UNWIND_REQUIRE', cdata.has('HAVE_UNWIND') ? 'libunwind' : '')
|
|
||||||
pkgconf.set('DW_REQUIRE', cdata.has('HAVE_DW') ? 'libdw' : '')
|
|
||||||
|
|
||||||
# needed for generating -uninstalled.pc files
|
|
||||||
pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..'))
|
|
||||||
pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..'))
|
|
||||||
pkgconf.set('gstlibdir', join_paths(meson.build_root(), libgst.outdir()))
|
|
||||||
pkgconf.set('baselibdir', join_paths(meson.build_root(), gst_base.outdir()))
|
|
||||||
pkgconf.set('controllerlibdir', join_paths(meson.build_root(), gst_controller.outdir()))
|
|
||||||
pkgconf.set('netlibdir', join_paths(meson.build_root(), gst_net.outdir()))
|
|
||||||
|
|
||||||
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
|
|
||||||
|
|
||||||
pkg_files = [
|
|
||||||
'gstreamer-base',
|
|
||||||
'gstreamer-controller',
|
|
||||||
'gstreamer-net',
|
|
||||||
'gstreamer'
|
|
||||||
]
|
|
||||||
|
|
||||||
if not get_option('check').disabled()
|
|
||||||
pkg_files += ['gstreamer-check']
|
|
||||||
pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir()))
|
|
||||||
endif
|
|
||||||
|
|
||||||
foreach p : pkg_files
|
|
||||||
infile = p + '.pc.in'
|
|
||||||
outfile = p + '-1.0.pc'
|
|
||||||
configure_file(input : infile,
|
|
||||||
output : outfile,
|
|
||||||
configuration : pkgconf,
|
|
||||||
install_dir : pkg_install_dir)
|
|
||||||
|
|
||||||
infile = p + '-uninstalled.pc.in'
|
|
||||||
outfile = p + '-1.0-uninstalled.pc'
|
|
||||||
configure_file(input : infile,
|
|
||||||
output : outfile,
|
|
||||||
configuration : pkgconf)
|
|
||||||
endforeach
|
|
Loading…
Reference in a new issue