meson.build 745 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
lame_dep = cc.find_library('mp3lame', required : false)

if lame_dep.found() and cc.has_header_symbol('lame/lame.h', 'lame_init')
  lame_extra_c_args = []
  if cc.has_header_symbol('lame/lame.h', 'lame_set_VBR_quality')
    lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY']
  endif
  if cc.has_header_symbol('lame/lame.h', 'MEDIUM')
    lame_extra_c_args += ['-DGSTLAME_PRESET']
  endif
  lame = library('gstlame',
    ['gstlamemp3enc.c', 'plugin.c'],
13
    c_args : gst_plugins_good_args + lame_extra_c_args,
14 15 16 17 18
    include_directories : [configinc, libsinc],
    dependencies : [gstaudio_dep, lame_dep],
    install : true,
    install_dir : plugins_install_dir,
  )
19
  pkgconfig.generate(lame, install_dir : plugins_pkgconfig_install_dir)
20
endif