71 lines
2.2 KiB
Meson
71 lines
2.2 KiB
Meson
project('msoverlay', 'c',
|
|
version : '1.24.3',
|
|
license : 'LGPL',
|
|
default_options: [
|
|
'prefix=/usr',
|
|
'warning_level=2',
|
|
'buildtype=debugoptimized'
|
|
])
|
|
|
|
gst_dep = dependency('gstreamer-1.0')
|
|
gstbase_dep = dependency('gstreamer-base-1.0')
|
|
gstvideo_dep = dependency('gstreamer-video-1.0')
|
|
pango_dep = dependency('pangocairo', version : '>=1.22.0', required : true,
|
|
fallback: ['pango', 'libpangocairo_dep'],
|
|
default_options: ['cairo=enabled'])
|
|
cc = meson.get_compiler('c')
|
|
m_dep = cc.find_library('m')
|
|
|
|
gst_version = gst_dep.version()
|
|
version_arr = gst_version.split('.')
|
|
gst_version_major = version_arr[0].to_int()
|
|
gst_version_minor = version_arr[1].to_int()
|
|
gst_version_micro = version_arr[2].to_int()
|
|
|
|
api_version = '1.0'
|
|
soversion = 0
|
|
libversion = '@0@.@1@.0'.format(soversion, gst_version_minor * 100 + gst_version_micro)
|
|
|
|
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
|
|
|
|
plugin_c_args = ['-DHAVE_CONFIG_H']
|
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set_quoted('VERSION', gst_version)
|
|
cdata.set_quoted('PACKAGE', 'msoverlay')
|
|
cdata.set_quoted('PACKAGE_VERSION', gst_version)
|
|
cdata.set_quoted('PACKAGE_NAME', 'GStreamer ms overlay')
|
|
cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer ms overlay')
|
|
cdata.set_quoted('GST_PACKAGE_ORIGIN', 'https://gstreamer.freedesktop.org')
|
|
cdata.set_quoted('GST_API_VERSION', api_version)
|
|
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
|
cdata.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
|
|
|
gst_root = get_option('gst_root')
|
|
|
|
plugin_sources = files(
|
|
'src/gstmsoverlay.c',
|
|
'include/gstmsoverlay.h',
|
|
join_paths(gst_root, 'subprojects/gst-plugins-base/ext/pango/gstbasetextoverlay.c'),
|
|
join_paths(gst_root, 'subprojects/gst-plugins-base/ext/pango/gstpangoelement.c')
|
|
)
|
|
|
|
install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
|
|
|
|
include_dirs = include_directories(join_paths(gst_root, 'subprojects/gst-plugins-base/ext/pango/'), 'include')
|
|
|
|
msoverlay = library(
|
|
'msoverlay',
|
|
plugin_sources,
|
|
c_args: plugin_c_args,
|
|
include_directories: include_dirs,
|
|
dependencies: [gst_dep, gstbase_dep, gstvideo_dep, pango_dep, m_dep],
|
|
install: true,
|
|
install_dir: plugins_install_dir
|
|
)
|
|
|
|
configure_file(output : 'config.h', configuration : cdata)
|
|
|
|
|