Meson
lastmod 2024-10-30created 2024-10-223 edits
Meson is a software tool for automating the building of software. Rather than giving users unlimited flexibility, Meson adopts convention over configuration, encouraging standard development tools and practices.
Install
Example
gstreamer plugin template example
A sample template meson.build file for building GStreamer plugins:
plugin_c_args = ['-DHAVE_CONFIG_H']
cdata = configuration_data()
cdata.set_quoted('PACKAGE_VERSION', gst_version)
cdata.set_quoted('PACKAGE', 'gst-template-plugin')
cdata.set_quoted('GST_LICENSE', 'LGPL')
cdata.set_quoted('GST_API_VERSION', api_version)
cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer template Plug-ins')
cdata.set_quoted('GST_PACKAGE_ORIGIN', 'https://gstreamer.freedesktop.org')
configure_file(output : 'config.h', configuration : cdata)
gstaudio_dep = dependency('gstreamer-audio-1.0',
fallback: ['gst-plugins-base', 'audio_dep'])
# Plugin 1
plugin_sources = [
'src/gstplugin.c'
]
gstpluginexample = library('gstplugin',
plugin_sources,
c_args: plugin_c_args,
dependencies : [gst_dep],
install : true,
install_dir : plugins_install_dir,
)
# Plugin 2 (audio filter example)
audiofilter_sources = [
'src/gstaudiofilter.c',
]
gstaudiofilterexample = library('gstaudiofilterexample',
audiofilter_sources,
c_args: plugin_c_args,
dependencies : [gst_dep, gstaudio_dep],
install : true,
install_dir : plugins_install_dir,
)
# The TEMPLATE Plugin
### gstTEMPLATE_sources = [
### 'src/gstTEMPLATE.c',
### ]
###gstTEMPLATEexample = library('gstTEMPLATE',
### gstTEMPLATE_sources,
### c_args: plugin_c_args,
### dependencies : [gst_dep, gstbase_dep],
### install : true,
### install_dir : plugins_install_dir,
###)
See also
Favorite site
- Meson (software) - Wikipedia
- The Meson Build system
- Goodbye, CMake! Building a next-generation C++ build system with Meson - Inha University INT-i
Pages that link here