Merging gst-plugins-bad
[platform/upstream/gstreamer.git] / ext / soundtouch / meson.build
1 soundtouch_sources = [
2   'plugin.c',
3   'gstpitch.cc',
4   'gstbpmdetect.cc',
5 ]
6
7 soundtouch_cargs = ['-DHAVE_SOUNDTOUCH']
8 if get_option('soundtouch').disabled()
9   subdir_done()
10 endif
11
12 if not gnustl_dep.found() and get_option('soundtouch').enabled()
13   error('soundtouch plugin enabled but could not find gnustl dep for Android c++ support')
14 endif
15
16 soundtouch_dep = dependency('soundtouch', required : false)
17 if soundtouch_dep.found()
18   soundtouch_cargs += ['-DHAVE_SOUNDTOUCH_1_4']
19 else
20   soundtouch_dep = dependency('soundtouch-1.4', required : false)
21   if soundtouch_dep.found()
22     soundtouch_cargs += ['-DHAVE_SOUNDTOUCH_1_4']
23   else
24     soundtouch_dep = dependency('soundtouch-1.0', required : false)
25     # NOTE: I removed the checks for libSoundTouch.pc and so on.
26     # Add them back once we know which distros use them.
27   endif
28 endif
29 if not soundtouch_dep.found() and get_option('soundtouch').enabled()
30   error('soundtouch plugin enabled but soundtouch library not found')
31 endif
32
33 if soundtouch_dep.found()
34   gstsoundtouch = library('gstsoundtouch',
35     soundtouch_sources,
36     c_args : gst_plugins_bad_args + soundtouch_cargs,
37     cpp_args : gst_plugins_bad_args + soundtouch_cargs,
38     include_directories : [configinc],
39     dependencies : [gstaudio_dep, soundtouch_dep, gnustl_dep],
40     install : true,
41     install_dir : plugins_install_dir)
42   pkgconfig.generate(gstsoundtouch, install_dir : plugins_pkgconfig_install_dir)
43   plugins += [gstsoundtouch]
44 endif