Browse Source

set samples path on configure, add configure flag to turn off installation of DSEG14 font

cairo_optimizations
Alexandros Theodotou 3 years ago
parent
commit
f74de89b56
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 3
      data/meson.build
  2. 2
      inc/audio/metronome.h
  3. 4
      meson.build
  4. 8
      meson_options.txt
  5. 4
      src/audio/metronome.c

3
data/meson.build

@ -20,8 +20,7 @@ install_data ( @@ -20,8 +20,7 @@ install_data (
install_dir: schemasdir)
# install fonts if needed
should_install_dseg = not run_command('fc-list').stdout().contains('DSEG14')
if should_install_dseg
if get_option('install_dseg_font')
install_subdir (
join_paths ('fonts', 'DSEG14-Classic-MINI'),
install_dir: fontsdir)

2
inc/audio/metronome.h

@ -34,8 +34,6 @@ @@ -34,8 +34,6 @@
* @{
*/
#define METRONOME_SAMPLES_DIR \
CONFIGURE_DATADIR "/zrythm/samples"
#define METRONOME (&ZRYTHM->metronome)
/**

4
meson.build

@ -69,6 +69,8 @@ cdata.set_quoted ( @@ -69,6 +69,8 @@ cdata.set_quoted (
cdata.set_quoted (
'CONFIGURE_LIBDIR',
libdir)
cdata.set_quoted (
'SAMPLES_DIR', samplesdir)
cdata.set (
'MESON_SOURCE_ROOT',
meson.source_root ())
@ -460,7 +462,7 @@ summary = [ @@ -460,7 +462,7 @@ summary = [
' Generate developer docs: @0@'.format(get_option('gen_dev_docs')),
' Build/install manpage: @0@'.format(get_option('manpage')),
' Build/install user manual: @0@'.format(get_option('user_manual')),
' Install DSEG font: @0@'.format(should_install_dseg),
' Install DSEG font: @0@'.format(get_option('install_dseg_font')),
' Coverage reports: @0@'.format(get_option('b_coverage')),
' Optional libraries:',
' ffmpeg: @0@'.format(get_option('enable_ffmpeg')),

8
meson_options.txt

@ -74,3 +74,11 @@ option ( @@ -74,3 +74,11 @@ option (
type: 'boolean',
value: false,
description: 'Compile and link with strict flags (-Werror)')
option (
'install_dseg_font',
type: 'boolean',
value: true,
description: '''Install the DSEG14 font used by the
transport meters. Packagers should turn this off and
set the font as a dependency instead''')

4
src/audio/metronome.c

@ -63,11 +63,11 @@ metronome_init ( @@ -63,11 +63,11 @@ metronome_init (
{
self->emphasis_path =
g_strdup (
METRONOME_SAMPLES_DIR
SAMPLES_DIR
"/square_emphasis.wav");
self->normal_path =
g_strdup (
METRONOME_SAMPLES_DIR
SAMPLES_DIR
"/square_normal.wav");
/* decode */

Loading…
Cancel
Save