Fix build error due to upgrade to ffmpeg 7.1
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-good / ext / lame / meson.build
1 lame_dep = dependency('', required: false)
2 lame_option = get_option('lame')
3
4 if lame_option.disabled()
5   subdir_done()
6 endif
7
8 lame_extra_c_args = []
9 lame_dep = cc.find_library('mp3lame', required: false)
10 have_lame = cc.has_header_symbol('lame/lame.h', 'lame_init')
11 if have_lame
12   if cc.has_header_symbol('lame/lame.h', 'lame_set_VBR_quality')
13     lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY']
14   endif
15   if cc.has_header_symbol('lame/lame.h', 'MEDIUM')
16     lame_extra_c_args += ['-DGSTLAME_PRESET']
17   endif
18 else
19   lame_dep = dependency('mp3lame', fallback: ['lame', 'lame_dep'], required: lame_option)
20   have_lame = lame_dep.found()
21   lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY', '-DGSTLAME_PRESET', '-DLAME_SUBPROJECT']
22 endif
23
24 if not have_lame
25   subdir_done()
26 endif
27
28 lame = library('gstlame',
29   ['gstlamemp3enc.c', 'plugin.c'],
30   c_args : gst_plugins_good_args + lame_extra_c_args,
31   include_directories : [configinc, libsinc],
32   dependencies : [gstaudio_dep, lame_dep],
33   install : true,
34   install_dir : plugins_install_dir,
35 )
36
37 plugins += [lame]