rpicamsrc: Add experimental build using the Meson build system

Builds in about 10 seconds vs. 77 seconds with autotools.
This commit is contained in:
Tim-Philipp Müller 2016-09-19 12:06:05 +00:00
parent 39afecac32
commit 0a38642214
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{ global:
gst_plugin_desc;
local: *; };

36
sys/rpicamsrc/meson.build Normal file
View file

@ -0,0 +1,36 @@
rpicamsrc_sources = [
'gstrpicamsrc.c',
'gstrpicamsrcdeviceprovider.c',
'RaspiCapture.c',
'RaspiCamControl.c',
'RaspiPreview.c',
'RaspiCLI.c',
]
# This can be simplified once meson gets native support for glib-mkenums (soon)
glib_mkenums = find_program('glib-mkenums')
gstrpicam_enum_types_h = custom_target('gstrpicam-enum-types.h',
output : 'gstrpicam-enum-types.h',
input : files('gstrpicam_types.h'),
command : [glib_mkenums, '--template', meson.current_source_dir() + '/gstrpicam-enums-template.h', '@INPUT@'],
capture : true)
gstrpicam_enum_types_c = custom_target('gstrpicam-enum-types.c',
output : 'gstrpicam-enum-types.c',
input : files('gstrpicam_types.h'),
depends : [gstrpicam_enum_types_h],
command : [glib_mkenums, '--template', meson.current_source_dir() + '/gstrpicam-enums-template.c', '@INPUT@'],
capture : true)
mapfile = 'gstplugin.map'
library('gstrpicamsrc',
rpicamsrc_sources, gstrpicam_enum_types_h, gstrpicam_enum_types_c,
c_args : gst_rpicamsrc_args,
include_directories : config_inc,
link_args : '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile),
link_depends : mapfile,
dependencies : [gst_dep, gstbase_dep, gstvideo_dep] + mmal_deps,
install : true,
install_dir : plugins_install_dir)