mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
meson: Cleanup build files
Remove some twice declared variables and keep code style
This commit is contained in:
@@ -9,21 +9,21 @@ foreach id_postfix : clapper_apps
|
|||||||
bin_conf.set('PACKAGE_VERSION', meson.project_version())
|
bin_conf.set('PACKAGE_VERSION', meson.project_version())
|
||||||
bin_conf.set('ID_POSTFIX', id_postfix)
|
bin_conf.set('ID_POSTFIX', id_postfix)
|
||||||
bin_conf.set('prefix', get_option('prefix'))
|
bin_conf.set('prefix', get_option('prefix'))
|
||||||
bin_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
|
bin_conf.set('libdir', libdir)
|
||||||
bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
|
bin_conf.set('datadir', datadir)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'com.github.rafostar.Clapper.in',
|
input: 'com.github.rafostar.Clapper.in',
|
||||||
output: 'com.github.rafostar.Clapper' + app_postfix,
|
output: 'com.github.rafostar.Clapper' + app_postfix,
|
||||||
configuration: bin_conf,
|
configuration: bin_conf,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('bindir'),
|
install_dir: bindir,
|
||||||
install_mode: 'rwxr-xr-x'
|
install_mode: 'rwxr-xr-x'
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
clapper_symlink_cmd = 'ln -fs @0@ $DESTDIR@1@'.format(
|
clapper_symlink_cmd = 'ln -fs @0@ $DESTDIR@1@'.format(
|
||||||
'com.github.rafostar.Clapper',
|
'com.github.rafostar.Clapper',
|
||||||
join_paths(get_option('prefix'), get_option('bindir'), 'clapper')
|
join_paths(bindir, 'clapper')
|
||||||
)
|
)
|
||||||
meson.add_install_script('sh', '-c', clapper_symlink_cmd)
|
meson.add_install_script('sh', '-c', clapper_symlink_cmd)
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
sharedir = join_paths(get_option('prefix'), 'share')
|
|
||||||
iconsdir = join_paths(sharedir, 'icons', 'hicolor')
|
iconsdir = join_paths(sharedir, 'icons', 'hicolor')
|
||||||
|
|
||||||
appstream_util = find_program('appstream-util', required: false)
|
appstream_util = find_program('appstream-util', required: false)
|
||||||
@@ -16,16 +15,16 @@ install_data('com.github.rafostar.Clapper-symbolic.svg',
|
|||||||
install_dir: join_paths(iconsdir, 'symbolic', 'apps')
|
install_dir: join_paths(iconsdir, 'symbolic', 'apps')
|
||||||
)
|
)
|
||||||
install_data('com.github.rafostar.Clapper.gschema.xml',
|
install_data('com.github.rafostar.Clapper.gschema.xml',
|
||||||
install_dir: join_paths(sharedir, 'glib-2.0', 'schemas')
|
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
|
||||||
)
|
)
|
||||||
install_data('com.github.rafostar.Clapper.xml',
|
install_data('com.github.rafostar.Clapper.xml',
|
||||||
install_dir: join_paths(sharedir, 'mime', 'packages')
|
install_dir: join_paths(datadir, 'mime', 'packages')
|
||||||
)
|
)
|
||||||
install_data('com.github.rafostar.Clapper.desktop',
|
install_data('com.github.rafostar.Clapper.desktop',
|
||||||
install_dir: join_paths(sharedir, 'applications')
|
install_dir: join_paths(datadir, 'applications')
|
||||||
)
|
)
|
||||||
install_data('com.github.rafostar.Clapper.metainfo.xml',
|
install_data('com.github.rafostar.Clapper.metainfo.xml',
|
||||||
install_dir: join_paths(sharedir, 'metainfo')
|
install_dir: join_paths(datadir, 'metainfo')
|
||||||
)
|
)
|
||||||
gnome.compile_resources('com.github.rafostar.Clapper.data',
|
gnome.compile_resources('com.github.rafostar.Clapper.data',
|
||||||
'com.github.rafostar.Clapper.data.gresource.xml',
|
'com.github.rafostar.Clapper.data.gresource.xml',
|
||||||
|
42
lib/gst/clapper/meson.build
vendored
42
lib/gst/clapper/meson.build
vendored
@@ -37,14 +37,14 @@ gstclapper_defines = [
|
|||||||
gtk_deps = [gstgl_dep, gstglproto_dep]
|
gtk_deps = [gstgl_dep, gstglproto_dep]
|
||||||
have_gtk_gl_windowing = false
|
have_gtk_gl_windowing = false
|
||||||
|
|
||||||
gtk4_dep = dependency('gtk4', required : true)
|
gtk4_dep = dependency('gtk4', required: true)
|
||||||
|
|
||||||
if not gtk4_dep.version().version_compare('>=4.0.0')
|
if not gtk4_dep.version().version_compare('>=4.0.0')
|
||||||
error('GTK4 version on this system is too old')
|
error('GTK4 version on this system is too old')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if gst_gl_have_window_x11 and (gst_gl_have_platform_egl or gst_gl_have_platform_glx)
|
if gst_gl_have_window_x11 and (gst_gl_have_platform_egl or gst_gl_have_platform_glx)
|
||||||
gtk_x11_dep = dependency('gtk4-x11', required : false)
|
gtk_x11_dep = dependency('gtk4-x11', required: false)
|
||||||
if gtk_x11_dep.found()
|
if gtk_x11_dep.found()
|
||||||
gtk_deps += gtk_x11_dep
|
gtk_deps += gtk_x11_dep
|
||||||
if gst_gl_have_platform_glx
|
if gst_gl_have_platform_glx
|
||||||
@@ -55,7 +55,7 @@ if gst_gl_have_window_x11 and (gst_gl_have_platform_egl or gst_gl_have_platform_
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if gst_gl_have_window_wayland and gst_gl_have_platform_egl
|
if gst_gl_have_window_wayland and gst_gl_have_platform_egl
|
||||||
gtk_wayland_dep = dependency('gtk4-wayland', required : false)
|
gtk_wayland_dep = dependency('gtk4-wayland', required: false)
|
||||||
if gtk_wayland_dep.found()
|
if gtk_wayland_dep.found()
|
||||||
gtk_deps += [gtk_wayland_dep, gstglwayland_dep]
|
gtk_deps += [gtk_wayland_dep, gstglwayland_dep]
|
||||||
have_gtk_gl_windowing = true
|
have_gtk_gl_windowing = true
|
||||||
@@ -78,29 +78,29 @@ gstclapper_mpris_gdbus = gnome.gdbus_codegen('gstclapper-mpris-gdbus',
|
|||||||
|
|
||||||
gstclapper = library('gstclapper-' + api_version,
|
gstclapper = library('gstclapper-' + api_version,
|
||||||
gstclapper_sources + gstclapper_mpris_gdbus,
|
gstclapper_sources + gstclapper_mpris_gdbus,
|
||||||
c_args : gstclapper_defines,
|
c_args: gstclapper_defines,
|
||||||
link_args : noseh_link_args,
|
link_args: noseh_link_args,
|
||||||
include_directories : [configinc, libsinc],
|
include_directories: [configinc, libsinc],
|
||||||
version : libversion,
|
version: libversion,
|
||||||
install : true,
|
install: true,
|
||||||
install_dir : clapper_libdir,
|
install_dir: pkglibdir,
|
||||||
dependencies : [gtk4_dep, glib_dep, gio_dep,
|
dependencies: [gtk4_dep, glib_dep, gio_dep,
|
||||||
gstbase_dep, gstvideo_dep, gstaudio_dep,
|
gstbase_dep, gstvideo_dep, gstaudio_dep,
|
||||||
gsttag_dep, gstpbutils_dep, libm] + gtk_deps,
|
gsttag_dep, gstpbutils_dep, libm] + gtk_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
clapper_gir = gnome.generate_gir(gstclapper,
|
clapper_gir = gnome.generate_gir(gstclapper,
|
||||||
sources : gstclapper_sources + gstclapper_headers,
|
sources: gstclapper_sources + gstclapper_headers,
|
||||||
namespace : 'GstClapper',
|
namespace: 'GstClapper',
|
||||||
nsversion : api_version,
|
nsversion: api_version,
|
||||||
identifier_prefix : 'Gst',
|
identifier_prefix: 'Gst',
|
||||||
symbol_prefix : 'gst',
|
symbol_prefix: 'gst',
|
||||||
export_packages : 'gstreamer-clapper-1.0',
|
export_packages: 'gstreamer-clapper-1.0',
|
||||||
includes : ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0',
|
includes: ['Gst-1.0', 'GstPbutils-1.0', 'GstBase-1.0', 'GstVideo-1.0',
|
||||||
'GstAudio-1.0', 'GstTag-1.0'],
|
'GstAudio-1.0', 'GstTag-1.0'],
|
||||||
install : true,
|
install: true,
|
||||||
install_dir_typelib : join_paths(clapper_libdir, 'girepository-1.0'),
|
install_dir_typelib: join_paths(pkglibdir, 'girepository-1.0'),
|
||||||
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
|
extra_args: gir_init_section + ['-DGST_USE_UNSTABLE_API'],
|
||||||
dependencies : [gstbase_dep, gstvideo_dep, gstaudio_dep,
|
dependencies: [gstbase_dep, gstvideo_dep, gstaudio_dep,
|
||||||
gsttag_dep, gstpbutils_dep]
|
gsttag_dep, gstpbutils_dep]
|
||||||
)
|
)
|
||||||
|
68
lib/meson.build
vendored
68
lib/meson.build
vendored
@@ -7,10 +7,6 @@ libversion = meson.project_version()
|
|||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
cxx = meson.get_compiler('cpp')
|
cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
clapper_libdir = join_paths(
|
|
||||||
get_option('prefix'), get_option('libdir'), meson.project_name()
|
|
||||||
)
|
|
||||||
|
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
|
|
||||||
if cc.get_id() == 'msvc'
|
if cc.get_id() == 'msvc'
|
||||||
@@ -40,7 +36,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.has_link_argument('-Wl,-Bsymbolic-functions')
|
if cc.has_link_argument('-Wl,-Bsymbolic-functions')
|
||||||
add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
|
add_project_link_arguments('-Wl,-Bsymbolic-functions', language: 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Symbol visibility
|
# Symbol visibility
|
||||||
@@ -142,7 +138,7 @@ cdata.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/Rafostar/clapper/issue
|
|||||||
cdata.set_quoted('PACKAGE_NAME', 'GStreamer Clapper Libs')
|
cdata.set_quoted('PACKAGE_NAME', 'GStreamer Clapper Libs')
|
||||||
cdata.set_quoted('GST_API_VERSION', api_version)
|
cdata.set_quoted('GST_API_VERSION', api_version)
|
||||||
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
||||||
cdata.set_quoted('LIBDIR', clapper_libdir)
|
cdata.set_quoted('LIBDIR', pkglibdir)
|
||||||
cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
|
cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
|
||||||
|
|
||||||
warning_flags = [
|
warning_flags = [
|
||||||
@@ -192,25 +188,25 @@ cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer Plugins Clapper')
|
|||||||
cdata.set_quoted('GST_PACKAGE_ORIGIN', 'https://github.com/Rafostar/clapper')
|
cdata.set_quoted('GST_PACKAGE_ORIGIN', 'https://github.com/Rafostar/clapper')
|
||||||
|
|
||||||
# Mandatory GST deps
|
# Mandatory GST deps
|
||||||
gst_dep = dependency('gstreamer-1.0', version : gst_req,
|
gst_dep = dependency('gstreamer-1.0', version: gst_req,
|
||||||
fallback : ['gstreamer', 'gst_dep'])
|
fallback: ['gstreamer', 'gst_dep'])
|
||||||
gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
|
gstbase_dep = dependency('gstreamer-base-1.0', version: gst_req,
|
||||||
fallback : ['gstreamer', 'gst_base_dep'])
|
fallback: ['gstreamer', 'gst_base_dep'])
|
||||||
gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req,
|
gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'pbutils_dep'])
|
fallback: ['gst-plugins-base', 'pbutils_dep'])
|
||||||
gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req,
|
gstaudio_dep = dependency('gstreamer-audio-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'audio_dep'])
|
fallback: ['gst-plugins-base', 'audio_dep'])
|
||||||
gsttag_dep = dependency('gstreamer-tag-1.0', version : gst_req,
|
gsttag_dep = dependency('gstreamer-tag-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'tag_dep'])
|
fallback: ['gst-plugins-base', 'tag_dep'])
|
||||||
gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
|
gstvideo_dep = dependency('gstreamer-video-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'video_dep'])
|
fallback: ['gst-plugins-base', 'video_dep'])
|
||||||
|
|
||||||
# GStreamer OpenGL
|
# GStreamer OpenGL
|
||||||
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
|
gstgl_dep = dependency('gstreamer-gl-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'gstgl_dep'], required: true)
|
fallback: ['gst-plugins-base', 'gstgl_dep'], required: true)
|
||||||
gstglx11_dep = dependency('', required : false)
|
gstglx11_dep = dependency('', required: false)
|
||||||
gstglwayland_dep = dependency('', required : false)
|
gstglwayland_dep = dependency('', required: false)
|
||||||
gstglegl_dep = dependency('', required : false)
|
gstglegl_dep = dependency('', required: false)
|
||||||
|
|
||||||
gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis')
|
gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis')
|
||||||
gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys')
|
gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys')
|
||||||
@@ -232,23 +228,23 @@ foreach api : ['gl', 'gles2']
|
|||||||
set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
|
set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version : gst_req,
|
gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'gstglproto_dep'], required: true)
|
fallback: ['gst-plugins-base', 'gstglproto_dep'], required: true)
|
||||||
if gst_gl_have_window_x11
|
if gst_gl_have_window_x11
|
||||||
gstglx11_dep = dependency('gstreamer-gl-x11-1.0', version : gst_req,
|
gstglx11_dep = dependency('gstreamer-gl-x11-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'gstglx11_dep'], required: true)
|
fallback: ['gst-plugins-base', 'gstglx11_dep'], required: true)
|
||||||
endif
|
endif
|
||||||
if gst_gl_have_window_wayland
|
if gst_gl_have_window_wayland
|
||||||
gstglwayland_dep = dependency('gstreamer-gl-wayland-1.0', version : gst_req,
|
gstglwayland_dep = dependency('gstreamer-gl-wayland-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'gstglwayland_dep'], required: true)
|
fallback: ['gst-plugins-base', 'gstglwayland_dep'], required: true)
|
||||||
endif
|
endif
|
||||||
if gst_gl_have_platform_egl
|
if gst_gl_have_platform_egl
|
||||||
gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req,
|
gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version: gst_req,
|
||||||
fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true)
|
fallback: ['gst-plugins-base', 'gstglegl_dep'], required: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libm = cc.find_library('m', required : false)
|
libm = cc.find_library('m', required: false)
|
||||||
glib_dep = dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep'])
|
glib_dep = dependency('glib-2.0', version: glib_req, fallback: ['glib', 'libglib_dep'])
|
||||||
gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
|
gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
|
||||||
gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
|
gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
|
||||||
|
|
||||||
@@ -259,9 +255,7 @@ cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', 'Unknown')
|
|||||||
configinc = include_directories('.')
|
configinc = include_directories('.')
|
||||||
libsinc = include_directories('gst')
|
libsinc = include_directories('gst')
|
||||||
|
|
||||||
gnome = import('gnome')
|
gir = find_program('g-ir-scanner', required: true)
|
||||||
gir = find_program('g-ir-scanner', required : true)
|
|
||||||
|
|
||||||
if not gir.found()
|
if not gir.found()
|
||||||
error('Clapper requires GI bindings to be compiled')
|
error('Clapper requires GI bindings to be compiled')
|
||||||
endif
|
endif
|
||||||
@@ -273,4 +267,4 @@ gir_init_section = ['--add-init-section=extern void gst_init(gint*,gchar**);' +
|
|||||||
'gst_init(NULL,NULL);', '--quiet'
|
'gst_init(NULL,NULL);', '--quiet'
|
||||||
]
|
]
|
||||||
subdir('gst')
|
subdir('gst')
|
||||||
configure_file(output : 'config.h', configuration : cdata)
|
configure_file(output: 'config.h', configuration: cdata)
|
||||||
|
23
meson.build
23
meson.build
@@ -11,13 +11,13 @@ project('com.github.rafostar.Clapper', 'c', 'cpp',
|
|||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
python = import('python')
|
python = import('python')
|
||||||
python_bin = python.find_installation('python3')
|
|
||||||
|
|
||||||
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
|
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||||
|
libdir = join_paths(get_option('prefix'), get_option('libdir'))
|
||||||
|
datadir = join_paths(get_option('prefix'), get_option('datadir'))
|
||||||
|
|
||||||
if not python_bin.found()
|
pkglibdir = join_paths(libdir, meson.project_name())
|
||||||
error('No valid python3 binary found')
|
pkgdatadir = join_paths(datadir, meson.project_name())
|
||||||
endif
|
|
||||||
|
|
||||||
if get_option('clapper-lib')
|
if get_option('clapper-lib')
|
||||||
subdir('lib')
|
subdir('lib')
|
||||||
@@ -28,11 +28,14 @@ if get_option('clapper-player')
|
|||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|
||||||
installdir = join_paths(get_option('prefix'), 'share', meson.project_name())
|
install_subdir('src', install_dir: pkgdatadir)
|
||||||
install_subdir('src', install_dir : installdir)
|
install_subdir('extras', install_dir: pkgdatadir)
|
||||||
install_subdir('extras', install_dir : installdir)
|
install_subdir('css', install_dir: pkgdatadir)
|
||||||
install_subdir('css', install_dir : installdir)
|
install_subdir('ui', install_dir: pkgdatadir)
|
||||||
install_subdir('ui', install_dir : installdir)
|
|
||||||
|
|
||||||
|
python_bin = python.find_installation('python3')
|
||||||
|
if not python_bin.found()
|
||||||
|
error('No valid python3 binary found')
|
||||||
|
endif
|
||||||
meson.add_install_script('build-aux/meson/postinstall.py')
|
meson.add_install_script('build-aux/meson/postinstall.py')
|
||||||
endif
|
endif
|
||||||
|
@@ -1,20 +1,20 @@
|
|||||||
option('clapper-player',
|
option('clapper-player',
|
||||||
type : 'boolean',
|
type: 'boolean',
|
||||||
value : true,
|
value: true,
|
||||||
description: 'Build Clapper player'
|
description: 'Build Clapper player'
|
||||||
)
|
)
|
||||||
option('clapper-lib',
|
option('clapper-lib',
|
||||||
type : 'boolean',
|
type: 'boolean',
|
||||||
value : true,
|
value: true,
|
||||||
description: 'Build Clapper libs (including API)'
|
description: 'Build Clapper libs (including API)'
|
||||||
)
|
)
|
||||||
option('devel-checks',
|
option('devel-checks',
|
||||||
type : 'boolean',
|
type: 'boolean',
|
||||||
value : false,
|
value: false,
|
||||||
description: 'GStreamer GLib checks and asserts such as API guards (disable for stable releases)'
|
description: 'GStreamer GLib checks and asserts such as API guards (disable for stable releases)'
|
||||||
)
|
)
|
||||||
option('deprecated-glib-api',
|
option('deprecated-glib-api',
|
||||||
type : 'boolean',
|
type: 'boolean',
|
||||||
value : true,
|
value: true,
|
||||||
description: 'Allow using of deprecated GLib API'
|
description: 'Allow using of deprecated GLib API'
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user